Prolem when using TableControlCheckBoxClick and TableControlCurrentCellKeyDown on GGC

Hi,

I have GGC and BindingSource bind to it. BindingSource has table with two columns: Selected (boolean) and Value (decimal)

On code, I added two events, TableControlCheckBoxClick and TableControlCurrentCellKeyDown

My prolem is when I clicked checkbox, or Space key, in cell Selected on first time, value on BindingSource changed but interface not, the second time I clicked, it worked

I have attached a sample for you.

Regards


Attachment: DataGrid_20210510_CheckBoxClick_cf36c15a.zip

5 Replies 1 reply marked as answer

BT Balamurugan Thirumalaikumar Syncfusion Team May 11, 2021 02:07 PM UTC

Hi hieudt, 

Thank you for interesting in Syncfusion products. 

We have checked the reported query “Problem when using TableControlCheckBoxClick and TableControlCurrentCellKeyDown on GGC” and provided sample at our end. Since you have got the row/column index to get the StyleInfo from the current cell without moving or activating the current cell, the issue was ocurred. So that, DisplayElement’s kind property given the table type instead of record when select the cell on first time. In order to achieve your requirement we suggest you to get row/column from event’s event args or move the current cell to current record. You can refer the following tested sample for your reference. 


Please let us know if you would require any other assistance. we will be happy to assist you. 

Regards, 
Balamurugan Thirumalaikumar  



HI hieudt May 12, 2021 02:32 AM UTC

Hi,

Tks for your reply

After running your code, I see problem still occurs

First time I check cell or Space-keyDown, current cell not update interface. Second time onward, it works

And about checking cell, if I click on checkbox symbol, it will not works. But if I click on cell, it works

Regards


BT Balamurugan Thirumalaikumar Syncfusion Team May 13, 2021 03:52 AM UTC

Hi hieudt,, 

Thank you for your update. 

We are little bit unclear with the reported scenario. Please confirm with us our GridGroupingControl's TableControlCheckBoxClick, TableControlCurrentCellKeyDown, and TableControlCellClick events are fired when cell click, checkbox click and space keydown, styleinfo returns the column name that you tried to pass as a parameter to your CheckGridResult method. All three events are performing the same things, so what is your specific requirement and what are you trying to do with this. Please provide us the above details which would be more helpful to provide you the solution as earlier possible. 

Balamurugan Thirumalaikumar  




HI hieudt May 13, 2021 04:13 AM UTC

Hi,

Tks for your reply

I will describe more details about what I want to do

In GGC, I have column "Value", fill value from 1001 to 1026

When I CheckBoxClick, or CellClick, or KeyDown on cell "Select", I want value on current cell "Select" changing and updating on interface, and on rows that have value match first 3 characters of current cell, value on "Select" cell changing too

Problem occurs when 1st time I do, value on current cell updating in BindingSource but not interface, 2nd time I do, in same cell, it works normal. When I move to another cell and repeat selecting, problem occurs again

When running my/your sample, you will notice that if you CheckBoxClick, or CellClick, or KeyDown on row has value 1001, value cell "Select" from row 1002 to 1009 will update, but not row 1001; repeat again and it working

Regards


AR Arulpriya Ramalingam Syncfusion Team May 17, 2021 02:49 AM UTC

Hi Hieudt, 
 
Thank you for the update. 
 
We have validated the sample with CheckBokClick and space button click use cases. The reported scenario occurred due to the values for checkbox click and spacebar key actions are done from our source level and you have changed the values based on current value of the record (false if true). So that the values are overridden. We have restricted the base action by e.Cancel property. Please refer to the sample for further details. 
 
 
Regards, 
Arulpriya R. 


Marked as answer
Loader.
Up arrow icon