I have a grid using multiple checkboxes for each row of grid (which represent days of week)
I am trying to catch when user checks/unchecks box so I can update DB.
After a bit of searching for checkbox editor I came across example in Sample 03 using an InvertedDisabledCheckBox event handler
I have amended slightly so that it should pass in row and col as below. However the event handler is getting fired so that
a single checkbox click means the event is triggered for all checkboxes in the grid. This would be OK if I didnt have to make a db call
which I obviously want to limit to the grid cell that changed if possible. I have also tried just registering a single handler (against first checkbox cell)
but this still fires as many times as there are checkboxes in grid
Any pointers appreciated.
for (int i = 0; i < 7; i++)
gridMain[r, i + 2] = new SourceGrid.Cells.CheckBox(null, true);
gridMain[r, i + 2].FindController<SourceGrid.Cells.Controllers.CheckBox>().CheckedChanged += InvertDisabledCheckBox(r,i +2);
private EventHandler InvertDisabledCheckBox(int row, int col)
log.Debug("Checkbox row:" + row + " col:" + col);