Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Multiselect checkboxes in Grid
posted

I have the following problem:
I have a column with a checkbox.
I would like to select multiple rows and then click a check box.
Then, all checkboxes to update the value of the modified active checkbox.

How can I do that?

Screenshot:

 

I found a similar topic:

http://forums.infragistics.com/forums/p/23132/84752.aspx#84752

Is there now a built in function in latest version of UltraGrid?

If not, how can I implement this function?

Regards,

Markus

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Markus,

    No, there's no built-in way to do this. In fact, even with code, this will be a bit tricky, because clicking on a cell and entering edit mode on that cell will de-select the selected cells.

    I'd recommend using a right-click menu, instead, if you can. That would certainly be easier to implement. The user could right-click on the selected cells and you could show a context menu with options for "Check All" and "Uncheck All". Then you just loop through the grid.Selected.Cells collection and update the Value of each cell.

    If you must do this by a left-click, then you would probably have to disable the column or handle BeforeEnterEditMode and always cancel it for this checkbox column. This will disable the clicking behavior on the cell entirely and then you could use the grid's MouseDown event to trap for clicks on the checkbox cells and manually update the Value of the cell or cells in code as you see fit.

Children