Capturing Checkbox change on Jiwa Grid  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Capturing Checkbox change on Jiwa Grid

Postby SBarnes » Wed Jun 29, 2016 6:25 pm

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
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Capturing Checkbox change on Jiwa Grid  Topic is solved

Postby Mike.Sheen » Wed Jun 29, 2016 7:09 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Capturing Checkbox change on Jiwa Grid

Postby SBarnes » Wed Jun 29, 2016 7:24 pm

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests