Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

ASPxGridLookup - How to implement the multiple selection DropDownWindow scenario

$
0
0

This example demonstrates how to use the ASPxGridLookup to select multiple values from a dropdown grid containing lookup items. The ASPxGridLookup is bound with the custom DataItem defined within the "LookUpDataItem" type (contains row field).

The embedded ASPxGridView component is pre-customized as the ASPxListBox:

- The ASPxGridView's Header is hidden;

- The ASPxGridView's Pager is used for splitting DataItems within multiple pages to improve the client-side performance.


The embedded ASPxGridView's sever-side "CustomJSProperties" event is attached by handling the ASPxGridLookup's Init event. To get a reference to the embedded ASPxGridView, use the ASPxGridLookup.GridView property.

The embedded ASPxGridView's client-side "SelectionChanged" event is attached by handling the ASPxGridLookup's Init event, via the ASPxGridLookup.GridView.ClientSideEvents.SelectionChanged property.


UPDATED:

Starting with version v2014 vol 1 (v14.1), the "Select All" functionality is available out of the box:
S173621: ASPxGridView - Add the built-in SelectAll CheckBox for Command Column

Simply set the GridViewCommandColumn.SelectAllCheckboxMode property to GridViewSelectAllCheckBoxMode.AllPages to activate it. Please refer to the ASP.NET: GridView Select All Rows Updated blog post and the Select All Rows demo for more information.

OBSOLETE:

For the "Select All" functionality, instructions from the ASPxGridView - How to implement SelectRows and SelectAllRowsOnPage CheckBox features KB Article is used.

For the "partial selection" functionality, newly implemented ASPxCheckBox rendering (ASP.NET Check Box - New Render State For Multiple Controls (available now in v2011.1)) is used.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>