How to add checkbox to group header

I need to add a checkbox to the group header, so that when the check box is checked the who group is selected. I browsed the forum, there are some related threads, but the link for the examples provided in those threads are invalid, can some one please help.

Thanks


1 Reply

JP Jeya Preetha M Syncfusion Team May 15, 2012 11:27 AM UTC

Hi Rayzhahng,

Thanks for your interest in Syncfusion products.

From your query, I understand that you need to set check box in the group header for that please refer the following code snippet.

<code>

if (e.TableCellIdentity.DisplayElement.Kind==Syncfusion.Grouping.DisplayElementKind.GroupHeader && e.TableCellIdentity.Column != null )

{

e.Style.CellType = GridCellTypeName.CheckBox;

}

</code> 

After that check if the check box is selected using "QueryCellInfo" event. If it is selected add the the records in "Selected Record.AddRanges()".

Please let me know if this helps you.

Regards,
Jeya Preetha M


Loader.
Up arrow icon