Page 1 of 1

Capturing Checkbox change on Jiwa Grid

PostPosted: Wed Jun 29, 2016 6:25 pm
by SBarnes
Hi Guys

I have Jiwa grid to which I have added a checkbox column as shown in the code below (I have left out the other columns for simplicity and this is in a custom form), all of this works fine including loading the grid with lines of data, however I am at a bit of a loss as to how to capture the value of the checkbox changing, on the normal spread control there is the Check changed event and on a stand alone grid I've used CellClickEnd before , which with the Jiwa Grid gives the correct row and column for but not the value as it changes, any ideas as to what I might try?



jgNonDeliveries.AddColumn("Chosen", new FarPoint.Win.Spread.CellType.CheckBoxCellType(), "Select", 5, false, true, false, false);

jgNonDeliveries.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode;
jgNonDeliveries.EditModePermanent = false;
jgNonDeliveries.SelectionBlockOptions = FarPoint.Win.Spread.SelectionBlockOptions.Rows;
jgNonDeliveries.SetupComplete();

Thanks

Re: Capturing Checkbox change on Jiwa Grid  Topic is solved

PostPosted: Wed Jun 29, 2016 7:09 pm
by Mike.Sheen
SBarnes wrote:I am at a bit of a loss as to how to capture the value of the checkbox changing


Hi Stuart,

You should add a handler for the buttonclicked event of the grid. Checkboxes will fire a buttonclicked event when checked or unchecked - the change event should be used for text, date for numeric type cells, and combo type cells should look at the comboselchange event.

Mike

Re: Capturing Checkbox change on Jiwa Grid

PostPosted: Wed Jun 29, 2016 7:24 pm
by SBarnes
Hi Mike,

Thanks for the quick reply, that detail will be helpful in the future on other jiwa grids no doubt, I actually realised that given the form is a dialog and the only thing on it besides the OK and Cancel buttons was the grid it was redundant to capture the event anyway as all I needed to do was roll over the rows when the user clicked OK and then set the corresponding values back to my list of objects, as all I really care about is that the user clicked OK and what the final values are, not anything in between.

But as always thanks for the help.