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
795
Event for caching change in checkbox value in ultragrid
posted

Hi,

I have added a checkbox column in my ulrawingrid using the following code

 grid.DisplayLayout.Bands[0].Columns.Add(checkboxNamecheckboxCaption);
                grid.DisplayLayout.Bands[0].Columns[checkboxName].DataType = typeof(bool);
                grid.DisplayLayout.Bands[0].Columns[checkboxName].CellClickAction = CellClickAction.Edit;
                grid.DisplayLayout.Bands[0].Columns[checkboxName].Header.CheckBoxVisibility = HeaderCheckBoxVisibility.Always;
                grid.DisplayLayout.Bands[0].Columns[checkboxName].Header.CheckBoxSynchronization = HeaderCheckBoxSynchronization.Band;
                grid.DisplayLayout.Bands[0].Columns[checkboxName].CellActivation = Activation.AllowEdit;
                grid.DisplayLayout.Bands[0].Columns[checkboxName].Group = grid.DisplayLayout.Bands[0].Groups[ultraGroupKey];
                SetCheckBoxAtFirstPosition(gridcheckboxName);

In the CellChange event of grid I am checking the e.Cell.Column.Key and if it is the same as checkbox then I am enabling/disabling some columns based on it.
But inside the CellChange event the value of the cell is not correct. So I have used Cell.Text which is currently correct.
The problem is the event is not being fired when using the checkbox on the top of the grid to select all the checkboxes.
How can I effectively get the change event for the checkbox. Also will the text value of the cell work in all cases and will not be finicky?
Parents
No Data
Reply Children
No Data