RadListBox
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[EmbeddedSkin("ListBox", typeof(RadListBox))]
[EmbeddedSkin("ListBox", "Default", typeof(RadListBox))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadListBox))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
[RequiredScript(typeof(jQueryPlugins), 1)]
[RequiredScript(typeof(TouchScrollExtender), 2)]
[RequiredScript(typeof(OData), 3)]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadListBox", "Telerik.Web.UI.ListBox.RadListBoxScripts.js")]
[ValidationProperty("SelectedValue")]
[ControlValueProperty("SelectedValue")]
[TelerikToolboxCategory("Data")]
[ToolboxBitmap(typeof(RadListBox), "Toolbox.Icons.ListBox.png")]
public class RadListBox : ControlItemContainer, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IFeatureGroup, INamingContainer, IXmlSerializable, IControlItemContainer, ICallbackEventHandler, IPostBackEventHandler, IFlatBoundContainer
Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlRadDataBoundControlControlItemContainerRadListBox...
Implements:
Inherited Members
Constructors
public RadListBox()
Properties
Gets or sets a value indicating whether to update the underlying datasource after postback caused by reorder, delete or transfer.
public bool AllowAutomaticUpdates { get; set; }
true if the datasource should be update; otherwise, false. The default value is false.
Automatic updates require postback so the AutoPostBackOnDelete, AutoPostBackOnReorder or AutoPostBackOnTransfer should be set to
truedepending on the requirements.
Gets or sets a value indicating whether RadListBox displays the delte button.
[ClientControlProperty]
public bool AllowDelete { get; set; }
true if delete button is displayed; otherwise, false. The default value is false.
Gets or sets a value indicating whether RadListBox displays the reordering buttons.
[ClientControlProperty]
public bool AllowReorder { get; set; }
true if reordering UI is displayed; otherwise, false. The default value is false.
Gets or sets a value indicating whether RadListBox displays the transfer buttons.
[ClientControlProperty]
public bool AllowTransfer { get; set; }
true if transfer UI is displayed; otherwise, false. The default value is false.
Gets or sets a value indicating whether the user can transfer the same item more than once.
[ClientControlProperty]
public bool AllowTransferDuplicates { get; set; }
true if the user should be able to transfer the same item more than once; otherwise, false. The default value is false.
The property should only be used together with SelectionType="Copy"
Gets or sets a value indicating whether the double click on a item causes transfer
[ClientControlProperty]
[ClientPropertyName("_allowTransferOnDblClick")]
public bool AllowTransferOnDoubleClick { get; set; }
true if the user should be able to transfer items with double click; otherwise, false. The default value is false.
Gets or sets the value of the aria-label attribute rendered on the RadListBox root element when EnableAriaSupport is true.
public string AriaLabel { get; set; }
Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the RadListBox selection.
[Bindable(false)]
[ClientControlProperty]
public bool AutoPostBack { get; set; }
Set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from a list control.
This property can be used to allow automatic population of other controls on the Web page based on a user's selection from a list.
The value of this property is stored in view state.
The server-side event that is fired is SelectedIndexChanged.
Gets or sets a value indicating whether RadListBox should post back after delete.
[ClientControlProperty]
public bool AutoPostBackOnDelete { get; set; }
true if RadListBox should postback after delete; otherwise, false. The default value is false.
Gets or sets a value indicating whether RadListBox should post back after reorder.
[ClientControlProperty]
public bool AutoPostBackOnReorder { get; set; }
true if RadListBox should postback after reorder; otherwise, false. The default value is false.
Gets or sets a value indicating whether RadListBox should post back after transfer.
[ClientControlProperty]
public bool AutoPostBackOnTransfer { get; set; }
true if RadListBox should postback after transfer; otherwise, false. The default value is false.
Used to customize the appearance and position of the buttons displayed by RadListBox.
[PersistenceMode(PersistenceMode.InnerProperty)]
public ListBoxButtonSettings ButtonSettings { get; }
When set to true displays a checkbox next to each item.
[ClientControlProperty]
[ClientPropertyName("_checkBoxes")]
public bool CheckBoxes { get; set; }
Gets the currently checked items in the ListBox.
[Browsable(false)]
public virtual IList<RadListBoxItem> CheckedItems { get; }
Gets a list of all client-side changes (adding an Item, removing an Item, changing an Item's property) which have occurred.
[Browsable(false)]
public IList<ClientOperation<RadListBoxItem>> ClientChanges { get; }
Gets or sets the HTML template of a RadListBoxItem when added on the client.
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
public virtual string ClientItemTemplate { get; set; }
Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.
public override ControlCollection Controls { get; }
The collection of child controls for the specified server control.
Overrides:
The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()
protected override string CssClassFormatString { get; }
Overrides:
Gets or sets the selected culture. Localization strings will be loaded based on this value.
public CultureInfo Culture { get; set; }
The culture.
Gets or sets the key field in the data source. Usually this is the database column which denotes the primary key.
public string DataKeyField { get; set; }
The name of the key field in the data source specified.
DataKeyField is required for automatic data source updates during transfer, reorder and delete.
Gets a DataKeyCollection object that stores the key values of each record.
[Browsable(false)]
public virtual DataKeyCollection DataKeys { get; }
The data keys.
The DataKeys property is populated after databinding if the DataKeyField property is set.
Gets or sets the sort field in the data source. The sort field must be of numeric type.
public string DataSortField { get; set; }
The name of the sort field in the data source specified.
DataSortField is required for automatic data source updates during reorder.
Gets or sets the empty message.
public string EmptyMessage { get; set; }
The empty message.
Gets or sets the ITemplate that defines the RadListBox empty message template.
[TemplateContainer(typeof(RadListBox))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public virtual ITemplate EmptyMessageTemplate { get; set; }
The item template.
When set to true enables support for WAI-ARIA.
[ClientControlProperty]
[ClientPropertyName("enableAriaSupport")]
public bool EnableAriaSupport { get; set; }
When set to true enables Drag-and-drop functionality
[ClientControlProperty]
public bool EnableDragAndDrop { get; set; }
Gets or sets a value indicating whether images in list items should be lazy loaded when they become visible in the viewport.
public bool EnableImageLazyLoading { get; set; }
Gets or sets the EnableLoadOnDemand property.
public bool EnableLoadOnDemand { get; set; }
The EnableLoadOnDemand property.
Gets or sets the enable mark matches.
public bool EnableMarkMatches { get; set; }
The enable mark matches.
Get a footer of RadListBox.
[Browsable(false)]
public WebControl Footer { get; }
Gets or sets the ITemplate that defines the RadListBox footer template.
[TemplateContainer(typeof(RadListBox))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public virtual ITemplate FooterTemplate { get; set; }
The footer template.
Get a header of RadListBox.
[Browsable(false)]
public WebControl Header { get; }
Gets or sets the ITemplate that defines the RadListBox header template.
[TemplateContainer(typeof(RadListBox))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public virtual ITemplate HeaderTemplate { get; set; }
The header template.
Gets the items of the RadListBox control.
[PersistenceMode(PersistenceMode.InnerProperty)]
public RadListBoxItemCollection Items { get; }
The RadListBoxItemCollection object which represents the items.
You can use the Items property to add and remove items in the RadListBox control.
Gets or sets the ITemplate that defines how items in the RadListBox control are displayed.
[TemplateContainer(typeof(RadListBoxItem))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public virtual ITemplate ItemTemplate { get; set; }
The item template.
The ID of the RadAjaxLoadingPanel to be displayed during LOD
[PersistenceMode(PersistenceMode.Attribute)]
[TypeConverter("Telerik.Web.Design.AjaxLoadingPanelIDConverter, Telerik.Web.Design, Version=2026.3.812.462, Culture=neutral, PublicKeyToken=121fae78165ba3d4")]
[ClientPropertyName("_loadingPanelID")]
[ClientControlProperty]
public string LoadingPanelID { get; set; }
Gets the localization.
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ListBoxButtons Localization { get; }
The localization.
Gets or sets a value indicating where RadListBox will look for its .resx localization files.
public string LocalizationPath { get; set; }
The localization path.
Gets or sets the name of the JavaScript function which handles the checkAllItemChecked client-side event.
[ClientControlEvent]
[ClientPropertyName("checkAllChecked")]
public string OnClientCheckAllChecked { get; set; }
The JavaScript function executed when CheckAll checkbox is checked.
Gets or sets the name of the JavaScript function which handles the checkAllItemChecked client-side event.
[ClientControlEvent]
[ClientPropertyName("checkAllChecking")]
public string OnClientCheckAllChecking { get; set; }
The JavaScript function executed before CheckAll checkbox is checked.
Gets or sets a value indicating the client-side event handler that is called before the browser context panel shows (after right-clicking an item).
[ClientControlEvent]
[ClientPropertyName("contextMenu")]
public string OnClientContextMenu { get; set; }
Use theOnClientContextMenu property to specify a JavaScript function that will be executed before the context menu shows after right clicking an item.
Gets or sets the name of the JavaScript function which handles the deleted client-side event.
[ClientControlEvent]
[ClientPropertyName("deleted")]
public string OnClientDeleted { get; set; }
The deleted event occurs when an itema are deleted (during transfer or delete for example).
Gets or sets the name of the JavaScript function which handles the deleting client-side event.
[ClientControlEvent]
[ClientPropertyName("deleting")]
public string OnClientDeleting { get; set; }
The deleting event occurs when an items are deleted (during transfer or delete for example).
Gets or sets the name of the JavaScript function which handles the itemDragging client-side event.
[ClientControlEvent]
[ClientPropertyName("dragging")]
public string OnClientDragging { get; set; }
The itemDragging event occurs when user moves the mouse while dragging an item.
Gets or sets the name of the JavaScript function which handles the itemDragStart client-side event.
[ClientControlEvent]
[ClientPropertyName("dragStart")]
public string OnClientDragStart { get; set; }
The itemDragStart event occurs when user starts to drag an item.
Gets or sets the name of the JavaScript function which handles the itemDropped client-side event.
[ClientControlEvent]
[ClientPropertyName("dropped")]
public string OnClientDropped { get; set; }
The itemDropped event occurs after the user drops an item onto another item.
Gets or sets the name of the JavaScript function which handles the itemDropping client-side event.
[ClientControlEvent]
[ClientPropertyName("dropping")]
public string OnClientDropping { get; set; }
The itemDropping event occurs when the user drops an item onto another item.
Gets or sets the name of the JavaScript function which handles the itemChecked client-side event.
[ClientControlEvent]
[ClientPropertyName("itemChecked")]
public string OnClientItemChecked { get; set; }
The itemChecked event occurs when the item is checked.
Gets or sets the name of the JavaScript function which handles the itemChecking client-side event.
[ClientControlEvent]
[ClientPropertyName("itemChecking")]
public string OnClientItemChecking { get; set; }
The itemChecking event occurs when the item is checked.
Gets or sets the name of the JavaScript function called when an Item is created during Web Service Load on Demand.
[ClientControlEvent]
[ClientPropertyName("itemDataBound")]
public string OnClientItemDataBound { get; set; }
[ClientControlEvent]
[ClientPropertyName("itemDoubleClicked")]
public string OnClientItemDoubleClicked { get; set; }
[ClientControlEvent]
[ClientPropertyName("itemDoubleClicking")]
public string OnClientItemDoubleClicking { get; set; }
Gets or sets a value indicating the client-side event handler that is called when the RadListBox items were just populated (for example from web service).
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("itemsRequested")]
public string OnClientItemsRequested { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientItemsRequested client-side event handler is called when the RadListBox items were just populated. Two parameters are passed to the handler:
- sender, the menu client object;
- eventArgs, null for this event.
This event cannot be cancelled.
Gets or sets a value indicating the client-side event handler that is called when the operation for populating the RadListBox has failed.
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("itemsRequestFailed")]
public string OnClientItemsRequestFailed { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientItemsRequestFailed client-side event handler is called when the operation for populating the RadListBox has failed. Two parameters are passed to the handler:
- sender, the menu client object;
- eventArgs with one property:
- set_cancel(), set to true to suppress the default action (alert message).
This event can be cancelled.
Gets or sets a value indicating the client-side event handler that is called when the RadListBOx is about to be populated (for example from web service).
[Bindable(false)]
[ClientControlEvent]
[ClientPropertyName("itemsRequesting")]
public string OnClientItemsRequesting { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientItemsRequesting client-side event handler is called when the RadListBox is about to be populated. Two parameters are passed to the handler:
- sender, the listBox client object;
- eventArgs with three properties:
- get_context(), an user object that will be passed to the web service.
- set_cancel(), used to cancel the event.
This event can be cancelled.
Gets or sets the name of the JavaScript function which handles the load client-side event.
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }
The load event occurs when RadListBox is initialized.
Gets or sets the name of the JavaScript function which handles the mouseOut client-side event.
[ClientControlEvent]
[ClientPropertyName("mouseOut")]
public string OnClientMouseOut { get; set; }
The mouseOut event occurs when the user moves away the mouse from a listbox item.
Gets or sets the name of the JavaScript function which handles the mouseOver client-side event.
[ClientControlEvent]
[ClientPropertyName("mouseOver")]
public string OnClientMouseOver { get; set; }
The mouseOver event occurs when the user hovers a listbox item with the mouse.
Gets or sets the name of the JavaScript function which handles the reordered client-side event.
[ClientControlEvent]
[ClientPropertyName("reordered")]
public string OnClientReordered { get; set; }
The reordered event occurs when an item is reordered.
Gets or sets the name of the JavaScript function which handles the reordering client-side event.
[ClientControlEvent]
[ClientPropertyName("reordering")]
public string OnClientReordering { get; set; }
The reordering event occurs when an item is reordered.
Gets or sets the name of the JavaScript function which handles the selectedIndexChanged client-side event.
[ClientControlEvent]
[ClientPropertyName("selectedIndexChanged")]
public string OnClientSelectedIndexChanged { get; set; }
The selectedIndexChanged client-side event occurs when the selection changes.
Gets or sets the name of the JavaScript function which handles the selectedIndexChanging client-side event.
[ClientControlEvent]
[ClientPropertyName("selectedIndexChanging")]
public string OnClientSelectedIndexChanging { get; set; }
The selectedIndexChanging client-side event occurs when the selection changes.
Gets or sets the name of the JavaScript function called when the client template for an item is evaluated
[ClientControlEvent]
[ClientPropertyName("templateDataBound")]
public string OnClientTemplateDataBound { get; set; }
Gets or sets the name of the JavaScript function which handles the transferred client-side event.
[ClientControlEvent]
[ClientPropertyName("transferred")]
public string OnClientTransferred { get; set; }
The transferred event occurs when an item is transferred.
Gets or sets the name of the JavaScript function which handles the transferring client-side event.
[ClientControlEvent]
[ClientPropertyName("transferring")]
public string OnClientTransferring { get; set; }
The transferring event occurs when an item is transferred.
Gets or sets a value indicating whether RadListBox should persist the changes that occurred client-side (reorder, transfer, delete) after postback.
[ClientControlProperty]
[ClientPropertyName("_persistChanges")]
public bool PersistClientChanges { get; set; }
true if client-side changes should be persisted after postback; otherwise, false. The default value is true.
Gets or sets the selected index of the RadListBox control.
[Bindable(true)]
[Browsable(false)]
public virtual int SelectedIndex { get; set; }
The index that should be selected.
Set the selected index to -1 to clear the selection.
Gets the currently selected Item in the ListBox.
[Bindable(false)]
[Browsable(false)]
public virtual RadListBoxItem SelectedItem { get; }
A RadListBoxItem which is currently selected. Null (Nothing) if there is no selected item (SelectedIndex is -1).
Gets the currently selected items in the ListBox.
[Browsable(false)]
public virtual IList<RadListBoxItem> SelectedItems { get; }
Gets or sets the Selection Mode of the RadListBox.
[ClientControlProperty]
[ClientPropertyName("selectionMode")]
[ClientPersistedProperty]
public ListBoxSelectionMode SelectionMode { get; set; }
Gets or sets a value that indicates whether the CheckAll checkbox is shown in ListBox.
[ClientControlProperty]
[ClientPropertyName("_showCheckAll")]
public bool ShowCheckAll { get; set; }
Automatically sorts items alphabetically (based on the Text property) in ascending or descending order.
[Bindable(false)]
public RadListBoxSort Sort { get; set; }
Gets/sets whether the sorting will be case-sensitive or not. By default is set to true.
[Bindable(false)]
public bool SortCaseSensitive { get; set; }
protected override bool SupportsRenderingMode { get; }
Overrides:
Gets or sets the transfer mode used for transfer operations.
[ClientControlProperty]
public ListBoxTransferMode TransferMode { get; set; }
The transfer mode. The default value is Move
If the TransferMode property is set to Move the items would be deleted from the source listbox before inserting them in the destination listbox. The TransferMode property of the listbox whose TransferToID property is set is taken into account.
Gets or sets the ID of the RadListBox which the current listbox should transfer to. Set the TransferToID property only of one of the two listboxes which will transfer items between each other.
public string TransferToID { get; set; }
The ID of the target listbox.
Gets the RadListBox which the current list box is configured to transfer to via the TransferToID property.
[Browsable(false)]
public RadListBox TransferToListBox { get; }
The transfer to list box. null (Nothing) if the TransferToID property is not set.
Gets the unique, hierarchically qualified identifier for the server control.
[ClientControlProperty]
[ClientPropertyName("_uniqueId")]
public override string UniqueID { get; }
The fully qualified identifier for the server control.
Overrides:
Gets the settings for the web service used to populate items.
[PersistenceMode(PersistenceMode.InnerProperty)]
public NavigationControlWebServiceSettings WebServiceSettings { get; }
An WebServiceSettings that represents the web service used for populating items.
Use the WebServiceSettings property to configure the web service used to populate items on demand. You must specify both Path and Method to fully describe the service.
In order to use the integrated support, the web service should have the following signature:
<pre><code class="lang-csharp">[ScriptService]public class WebServiceName : WebService { [WebMethod] public RadListBoxItemData[] WebServiceMethodName(object context) { // We cannot use a dictionary as a parameter, because it is only supported by script services. // The context object should be cast to a dictionary at runtime. IDictionary<string, object> contextDictionary = (IDictionary<string, object>) context;
//... }}
Methods
protected override void AddAttributesToRender(HtmlTextWriter writer)
Overrides:
Clears the checked items. The Checked property of all items is set to false.
public virtual void ClearChecked()
Clears the selection. The Selected property of all items is set to false.
public virtual void ClearSelection()
protected override void CreateChildControls()
Overrides:
protected override ControlItemCollection CreateChildItemCollection()
Overrides:
public virtual void Delete(IList<RadListBoxItem> items)
The list of items which should be deleted.
The Delete method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
public void Delete(RadListBoxItem item)
The item which should be deleted.
The Delete method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
protected override void DescribeComponent(IScriptDescriptor descriptor)
Overrides:
Finds the first item for which the specified predicate returns true.
public RadListBoxItem FindItem(Predicate<RadListBoxItem> predicate)
The predicate which will test all items.
Returns:The first item for which the specified predicate returns true. Null (Nothing) is returned if no item matches.
Finds the index of the item whose Value property is the same as the specified value.
Gets an array containing the indices of the currently checked items in the RadListBox control.
Gets an array containing the indices of the currently selected items in the RadListBox control.
Populates the RadListBox control from an XML file
public void LoadContentFile(string xmlFileName)
Name of the XML file.
Loads the posted content of the list control, if it is different from the last posting.
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
The key identifier for the control, used to index the postCollection.
postCollectionNameValueCollectionA NameValueCollection that contains value information indexed by control identifiers.
Returns:true if the posted content is different from the last posting; otherwise, false.
Overrides:
Raises the CheckAllCheck event.
protected virtual void OnCheckAllCheck(RadListBoxCheckAllCheckEventArgs e)
The EventArgs instance containing the event data.
protected virtual void OnDeleting(RadListBoxDeletingEventArgs e)
Raises the Dropped event.
protected virtual void OnDropped(RadListBoxDroppedEventArgs e)
The RadListBoxDroppedEventArgs instance containing the event data.
Raises the Dropping event.
protected virtual void OnDropping(RadListBoxDroppingEventArgs e)
The RadListBoxDroppingEventArgs instance containing the event data.
Raises the Inserted event.
protected virtual void OnInserted(RadListBoxEventArgs e)
The RadListBoxEventArgs instance containing the event data.
Raises the Inserting event.
protected virtual void OnInserting(RadListBoxInsertingEventArgs e)
The RadListBoxInsertingEventArgs instance containing the event data.
Raises the ItemCheck event.
protected virtual void OnItemCheck(RadListBoxItemEventArgs e)
The EventArgs instance containing the event data.
Raises the ItemCreated event.
protected virtual void OnItemCreated(RadListBoxItemEventArgs e)
The RadListBoxItemEventArgs instance containing the event data.
Raises the ItemDataBound event.
protected virtual void OnItemDataBound(RadListBoxItemEventArgs e)
The RadListBoxItemEventArgs instance containing the event data.
Raises the ItemsRequested event.
protected virtual void OnItemsRequested(RadListBoxItemsRequestedEventArgs e)
The RadListBoxItemsRequestedEventArgs instance containing the event data.
Raises the Reordered event.
protected virtual void OnReordered(RadListBoxEventArgs e)
The RadListBoxEventArgs instance containing the event data.
Raises the Reordering event.
protected virtual void OnReordering(RadListBoxReorderingEventArgs e)
The RadListBoxReorderingEventArgs instance containing the event data.
Raises the SelectedIndexChanged event.
protected virtual void OnTemplateNeeded(RadListBoxItemEventArgs e)
Raises the TextChanged event.
Raises the Transferred event.
protected virtual void OnTransferred(RadListBoxTransferredEventArgs e)
The RadListBoxTransferredEventArgs instance containing the event data.
Raises the Transferring event.
protected virtual void OnTransferring(RadListBoxTransferringEventArgs e)
The RadListBoxTransferringEventArgs instance containing the event data.
Raises the Updated event.
protected virtual void OnUpdated(RadListBoxEventArgs e)
The RadListBoxEventArgs instance containing the event data.
Raises the Updating event.
protected virtual void OnUpdating(RadListBoxUpdatingEventArgs e)
The RadListBoxUpdatingEventArgs instance containing the event data.
protected override void PerformDataBinding(IEnumerable data)
Overrides:
protected override void PerformSelect()
Overrides:
protected override void RaiseItemDataBound(ControlItem item)
Overrides:
Invokes the OnSelectedIndexChanged(EventArgs) method whenever posted data for the RadListBox control has changed.
protected override void RaisePostDataChangedEvent()
Overrides:
protected override void RaiseTemplateNeeded(ControlItem item)
Overrides:
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
Reorders the specified items with the specified offset. Fires the Reordering and Reordered events.
public virtual void Reorder(IList<RadListBoxItem> items, int offset)
The items.
offsetintThe offset.
he Reorder method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
Moves the item at old index to new index by calculating the offset. Fires the Reordering and Reordered events.
public void Reorder(int oldIndex, int newIndex)
The old (current) index of the item.
newIndexintThe new index of the item.
The Reorder method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
Reorders the specified items to the specified index. Fires the Reordering and Reordered events.
public virtual void ReorderToIndex(IList<RadListBoxItem> items, int targetIndex)
The items.
targetIndexintThe target index.
The ReorderToIndex method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
Moves the item at old index to new index. Fires the Reordering and Reordered events.
public void ReorderToIndex(int oldIndex, int newIndex)
The old (current) index of the item.
newIndexintThe new index of the item.
The ReorderToIndex method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
Sets the Selected property of a RadListBoxItem after a page is posted back.
Sorts the items in the RadListBox.
public void SortItems()
Transfers the specified list of items from the source to the destination listbox. Fires the Transferring and Transferred events.
public virtual void Transfer(IList<RadListBoxItem> itemsToTransfer, RadListBox sourceListBox, RadListBox destinationListBox)
The items to transfer.
sourceListBoxRadListBoxThe source list box.
destinationListBoxRadListBoxThe destination list box.
Always call the Transfer method of the RadListBox whose TransferToID property is set! The Transfer method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
Transfers the specified item from the source list box to the destination listbox. Fires the Transferring and Transferred events.
public void Transfer(RadListBoxItem item, RadListBox sourceListBox, RadListBox destinationListBox)
The item to transfer.
sourceListBoxRadListBoxThe source list box.
destinationListBoxRadListBoxThe destination list box.
Always call the Transfer method of the RadListBox whose TransferToID property is set! The Transfer method updates the underlying datasource if the AllowAutomaticUpdates is set to
true.
Events
Occurs when the checkAll item is checked
public event RadListBoxCheckAllCheckEventHandler CheckAllCheck
Occurs when items are deleted.
public event RadListBoxEventHandler Deleted
Occurs when items are deleted.
public event RadListBoxDeletingEventHandler Deleting
Occurs after drag and drop
public event RadListBoxDroppedEventHandler Dropped
Occurs before drag and drop
public event RadListBoxDroppingEventHandler Dropping
Occurs when item is inserted.
public event RadListBoxEventHandler Inserted
Occurs when item is inserted. Can be cancelled by setting the Cancel property to true.
public event RadListBoxInsertingEventHandler Inserting
Occurs when an item is checked
public event RadListBoxItemEventHandler ItemCheck
Occurs when item is created.
public event RadListBoxItemEventHandler ItemCreated
The ItemCreated event occurs before ItemDataBound and after postback if ViewState is enabled. ItemCreated is not raised for items defined inline in the ASPX.
Occurs when item is data bound.
public event RadListBoxItemEventHandler ItemDataBound
Use the ItemDataBound event to set additional properties of the databound items.
Occurs when the control performs callback.
public event RadListBoxItemsRequestedEventHandler ItemsRequested
Occurs when item is reordered.
public event RadListBoxEventHandler Reordered
Occurs when item is reordered. Can be cancelled by setting the Cancel property to true.
public event RadListBoxReorderingEventHandler Reordering
Occurs when the selected index has changed.
public event EventHandler SelectedIndexChanged
Occurs before template is being applied to the item.
public event RadListBoxItemEventHandler TemplateNeeded
The TemplateNeeded event is raised before a template is been applied on the item, both during round-trips (postbacks) and at the time data is bound to the control. The TemplateNeeded event is not raised for items which are defined inline in the page or user control.
The TemplateNeeded event is commonly used for dynamic templating.
Occurs when text was changed.
public event EventHandler TextChanged
Occurs when item is transferred.
public event RadListBoxTransferredEventHandler Transferred
Occurs when item is transferred. Can be cancelled by setting the Cancel property to true.
public event RadListBoxTransferringEventHandler Transferring
Occurs when items's sort order is updated during the reordering.
public event RadListBoxEventHandler Updated
Occurs when items's sort order is updated during the reordering.
public event RadListBoxUpdatingEventHandler Updating