ListControlExtensions
Wisej.Web.Markup.ListControlExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ListControl class.
public class ListControlExtensions
Methods
AllowHtml<TListControl>(listControl, value)

Sets the AllowHtml property of the specified ListControl.
Returns: TListControl. The modified list control with the updated AllowHtml property.
This method allows you to enable or disable HTML content in the list items.
myListControl.AllowHtml(true);
BorderStyle<TListControl>(listControl, borderStyle)

Sets the BorderStyle property of the specified ListControl.
Returns: TListControl. The modified list control with the updated BorderStyle property.
This method allows you to set the border style for the list control.
myListControl.BorderStyle(BorderStyle.FixedSingle);
DataSource<TListControl>(listControl, value)

Sets the DataSource property of the specified ListControl.
Returns: TListControl. The modified list control with the updated DataSource property.
This method allows you to set the data source for the list control.
myListControl.DataSource(myDataSource);
DisplayMember<TListControl>(listControl, value)

Sets the DisplayMember property of the specified ListControl.
Returns: TListControl. The modified list control with the updated DisplayMember property.
This method allows you to set the property to display for the list items.
myListControl.DisplayMember("Name");
FormatInfo<TListControl>(listControl, provider)

Sets the FormatInfo property of the specified ListControl.
Returns: TListControl. The modified list control with the updated FormatInfo property.
This method allows you to set the format provider for the list control.
myListControl.FormatInfo(CultureInfo.CurrentCulture);
FormatString<TListControl>(listControl, format)

Sets the FormatString property of the specified ListControl.
Returns: TListControl. The modified list control with the updated FormatString property.
This method allows you to set the format string for the list control.
myListControl.FormatString("C2");
FormattingEnabled<TListControl>(listControl, value)

Sets the FormattingEnabled property of the specified ListControl.
Returns: TListControl. The modified list control with the updated FormattingEnabled property.
This method allows you to enable or disable formatting for the list control.
myListControl.FormattingEnabled(true);
IconMember<TListControl>(listControl, value)

Sets the IconMember property of the specified ListControl.
Returns: TListControl. The modified list control with the updated IconMember property.
This method allows you to set the property to use as the icon for the list items.
myListControl.IconMember("IconPath");
Invalid<TListControl>(listControl, value)

Sets the Invalid property of the specified ListControl.
Returns: TListControl. The modified list control with the updated Invalid property.
This method allows you to set the invalid state for the list control.
myListControl.Invalid(true);
InvalidMessage<TListControl>(listControl, message)

Sets the InvalidMessage property of the specified ListControl.
Returns: TListControl. The modified list control with the updated InvalidMessage property.
This method allows you to set a custom invalid message for the list control.
myListControl.InvalidMessage("Invalid selection.");
OnSelectedValueChanged<TListControl>(listControl, action)

Attaches an event handler for the SelectedValueChanged event of the specified ListControl.
Returns: TListControl. The modified list control with the attached SelectedValueChanged event handler.
This method allows you to execute a custom action whenever the SelectedValue property of the list control changes.
myListControl.OnSelectedValueChanged(lc =>
{
AlertBox.Show("Selected value changed!");
});
PrefetchItems<TListControl>(listControl, count)

Sets the PrefetchItems property of the specified ListControl.
Returns: TListControl. The modified list control with the updated PrefetchItems property.
This method allows you to set the number of items to prefetch for the list control.
myListControl.PrefetchItems(50);
SelectedIndex<TListControl>(listControl, value)

Sets the SelectedIndex property of the specified ListControl.
Returns: TListControl. The modified list control with the updated SelectedIndex property.
This method allows you to set the selected index for the list control.
myListControl.SelectedIndex(0);
SelectedValue<TListControl>(listControl, value)

Sets the SelectedValue property of the specified ListControl.
Returns: TListControl. The modified list control with the updated SelectedValue property.
This method allows you to set the selected value for the list control.
myListControl.SelectedValue(someValue);
ShowToolTips<TListControl>(listControl, value)

Sets the ShowToolTips property of the specified ListControl.
Returns: TListControl. The modified list control with the updated ShowToolTips property.
This method allows you to enable or disable tooltips for the list items.
myListControl.ShowToolTips(true);
ToolTipMember<TListControl>(listControl, value)

Sets the ToolTipMember property of the specified ListControl.
Returns: TListControl. The modified list control with the updated ToolTipMember property.
This method allows you to set the property to use as the tooltip for the list items.
myListControl.ToolTipMember("Description");
ValueMember<TListControl>(listControl, value)

Sets the ValueMember property of the specified ListControl.
Returns: TListControl. The modified list control with the updated ValueMember property.
This method allows you to set the property to use as the value for the list items.
myListControl.ValueMember("ID");
VirtualScroll<TListControl>(listControl, value)

Sets the VirtualScroll property of the specified ListControl.
Returns: TListControl. The modified list control with the updated VirtualScroll property.
This method allows you to enable or disable virtual scrolling for the list control.
myListControl.VirtualScroll(true);
Last updated
Was this helpful?