I use these events to save and get values for my cell''s tag( e.style.Tag ). Things seem to work fine except when I tab into this cell or enter the cell using Left/Right arrows the cell behaves weird. When I mouse click into the cell, things are fine.
When I tab into the cell, for some reason my CurrentCell.IsEditing becomes false where as it should be true. Due to the way my code is setup, this leads me to hiding my usercontrol in the cell and so on. If I forcefully show the usercontrol in that cell, then the control never leaves the cell ( when I click on other cells for example).
Any idea why?
ADAdministrator Syncfusion Team August 27, 2004 07:49 PM
Try setting the grid.ActivateCurrentCellBehavior to SetCurrent to see if that handles this problem for you.
MBMadhavi BalusuAugust 30, 2004 11:10 AM
No, that did not help. This problem is only for those cells which have e.style.tag set to an integer value. Those cells whose tags I dont mess around with are fine ( tabs work as they are supposed to ). Any idea?
ADAdministrator Syncfusion Team August 30, 2004 12:32 PM
>>reason my CurrentCell.IsEditing becomes false
CurrentCell.IsEditing is normally set to true when CurrentCell.BeginEdit() is called. Do you have any custom cell types that you have derived? If so, does your renderer call NotifyCurrentCellChanging as discussed in this forum thread.
MBMadhavi BalusuAugust 30, 2004 02:54 PM
I tried to put NotifyCurrentCellChanging in Renderer''s OnSaveChanges and it not work. It''s got something to do with the setting of Tag value. Those cells that are not messed around in QueryCellInfo and SaveCellInfo are working fine.
I am attaching these 2 functions, maybe you will see something wrong here:
ADAdministrator Syncfusion Team August 30, 2004 03:52 PM
In your SaveCellInfo, when you set e.Handled = true;, this means the grid''s default save code will not be hit, and only the code you provided will be executed. Is this what you want? You might try commenting out this e.Handled code to see it letting the grid''s default code to execute will make a difference.
MBMadhavi BalusuAugust 30, 2004 03:56 PM
No improvement. I still have the problem.
ADAdministrator Syncfusion Team August 30, 2004 04:12 PM
Is the SaveCellInfo code being hit when things do not work? If not, that might suggest NotifyCurrentCellChanging is not being triggered. Normally this is called when you control value is initially changed, and not in OnSaveChanges.
If you can post a sample project showing the problem, we can try to spot something here.
MBMadhavi BalusuSeptember 14, 2004 10:13 AM
Just wanted to update you on this problem. I solved it and the reson for this behavior ( on tabbing cell looses focus ) was that I had:
this.DisableTextBox = true;
in my Renderer''s OnDraw. Duh!