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

Implement the "Select All" CheckBox editor in ASPxGridView's row in Batch Edit Mode

$
0
0

This example illustrates how to change editors based on other editors in a current row when ASPxGridView in Batch Edit Mode.
If an end-user checks the check box in ASPxGridView's "All" column, other check boxes in this row will be set checked. If an end-user unchecks the check box in the ASPxGridView's "All" column, other check boxes in this row will become unchecked. If all check boxes in ASPxGridView's row are checked, the check box in ASPxGridView's "All" columns will be set checked. If at least one of check boxes in ASPxGridView's row is checked, the check box in ASPxGridView's "All" column  will become grayed.

To allow the "All" check boxes grayed state, use the CheckBoxProperties.AllowGrayed,   CheckBoxProperties.ValueType, CheckBoxProperties.ValueGrayed  properties.

To implement the described scenario in common, handle the ASPxClientGridView.BatchEditStartEditing and CheckEditClientSideEvents.CheckedChanged events.

Note that unbound columns are used because the example database does not contain appropriate data to illustrate this scenario. This approach can be also easily applied to bound columns.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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