Hi,
I have created a column at runtime that I need to be able to modify and add a checkbox in the header. This checkbox should enable the user to select all / unselect all items in the ultrawebgrid. If anyone knows please tell me how I can add this checkbox to the header at runtime and make this happen. I tried doing
Dim CheckAll As New CheckBox
column.HeaderItem.TemplateControl.Controls.Add(CheckAll)
but this did not work. I have to create this at Runtime since the column is also created in Runtime, all examples I found so far show how to do this in design. Any help is greatly appreciated
its better to do this in the grid_init event and dont use a dim checkall as new checkbox but rather set the text to somethinglike <div><input type='checkbox' name='checkall' value='false' onclick='CheckAllRows();'></div> then just write a JS functionscalled CheckAllRows() and grab a handle to the grid and loop through the rows and check the boxes.
I have done same thing for me in UltraWebGrid but I am encountering following issues :
When I filter the content client side and click on Select all check box it also select the hidden rows. To get rid of this issue I used following code and it seems working fine. But when grid is grouped on any column this doesn't work for me.
{
count++;
}
selectedIds = selectedIds.substring(0, selectedIds.length );
2 When Grid is grouped on some column than this select all work only for first grouped rows as well as select all other rows of other grouped rows. this loop through selection doesn't work for other groups.
Please advice, it is urgently required.