This example demonstrates how to implement select/unselect for all rows in a group row.
It's possible to implement this behavior only by using ASPXGridView 9.1. For more information, please refer to Add client- and server-side methods to obtain rows belonging to a certain group.
First, place ASPxCheckBox and ASPxLabel into the Grid.Templates.GroupRowContent template.
Second, set the ASPxCheckBox.Checked property and the client-side ASPxCheckBox.ClientSideEvents.CheckedChanged event in the ASPxGridView.HtmlRowPrepared event handler.
In this example the ASPxLabel.Text is bound in the markup using Two-Way DataBinding.
See also
How to implement select/unselect for all rows in a group row in ASPxGridLookup
Question Comments
Added By: Brian Dukes 2 at: 7/15/2013 8:39:14 AM
I'm looking to do this exact thing in the latest 13.1.5 ASP.NET MVC controls -- How can this be done?
Added By: Gustavo Becerril at: 6/27/2014 4:38:28 PMThis example doesn't take into account grouping by more than one field, it merely selects the first item of every subgroup. I'd love to find out if there's a not-so resource intensive way to select every item inside every subgroup.
Added By: Artem (DevExpress Support) at: 6/29/2014 11:36:17 PMHello Gustavo,
I've moved your question to a separate thread created on your behalf:
The E1760 example doesn't select all rows if ASPxGridView is grouped by several columns
Please refer to it for further correspondence.
I use 14.1.8 MVC Controls,
how can I select all rows in a group?
Hello Gherda,
To process your recent post more efficiently, I created a separate ticket on your behalf: T180839: E1760 for MVC - How to implement select/unselect for all rows in a group row. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Sorry,
I do not understand about this example. Refer to the markup below :
<Templates>
<GroupRowContent>
<table>
<tr><td>
<dx:ASPxCheckBox ID="checkBox" runat="server" />
</td><td>
<dx:ASPxLabel ID="CaptionText" runat="server" Text='<%# GetCaptionText(Container) %>' />
</td></tr>
</table>
</GroupRowContent>
</Templates>
I don't see the ASPxLabel and ASPxCheckBox in the example.
Refer to the markup below, the checkbox only available for ASPxGridView.
<dx:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" />
Added By: Vladimir (DevExpress Support) at: 1/20/2015 11:21:49 PMHello,
Since demonstrated controls are placed into the GroupRowContent template, they appear only when ASPxGridView data is grouped by one or several columns. Please group data in the example to see the result.