Hi,
I'm stuck into an issue and I'm unable to figure out why its happening. :(
The issue is when I click on a cell on Grid Control, it is not getting reflected in grid's CurrentCell. Could you please tell me which property i need to set?
Thanks,
Amiya
HA
haneefm
Syncfusion Team
March 28, 2007 10:20 PM UTC
Hi Amiya,
You can set the following property to achieve this behavior
this.grid.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell;
This ClickOnCell setting means that clicking on a cell activates it.
Best regards,
Haneef
AM
Amiya
March 29, 2007 07:11 PM UTC
Still it doesn't work. I wonder why!
AM
Amiya
March 29, 2007 07:17 PM UTC
Haneef,
Is there any way to set the current cell programmatically?
Grid's CurrentCell always shows RowIndex and ColIndex -1. Is there any way of the setting the CurrentCell property value.
I'm implementing CutPaste feature in my grid, so this issue is very critical for me.
Please help.
Thanks,
Amiya
HA
haneefm
Syncfusion Team
March 29, 2007 07:33 PM UTC
Hi Amiya,
Use the CurrentCell.MoveTo method to move current cell to reqired position.
this.grid.CurrentCell.MoveTo(rowIndex,ColIndex,GridSetCurrentCellOptions.SetFocus);
Best regards,
Haneef
AM
Amiya
March 29, 2007 09:11 PM UTC
Haneef,
Since the ColIndex and RowIndex values were -1, even MoveTo method didn't work. I used CurrentCell.Activate in cell click and CurrentCell.SetCurrentCellNoActivate in InsertRows method to move the current cell.
I still don't understand why I have to do all this. Also to my surprise this issue occurs only in one of my application!
For time being I'll settle down for it. Please let me know if you know the root cause of it.
Thanks,
Amiya