I have a GDBG with GridBoundColumns in which I would like to skip selection of the cell in my first column when using tab or arrow keys to navigate the grid. This is a read only column and it doesn''t make sense to select this cell. How can I do this?
Thanks,
Jeff
AD
Administrator
Syncfusion Team
February 4, 2005 09:50 PM UTC
You can set GridStyleInfo.Enabled = false for these cells. Then they will be skipped.
Stefan
>I have a GDBG with GridBoundColumns in which I would like to skip selection of the cell in my first column when using tab or arrow keys to navigate the grid. This is a read only column and it doesn''t make sense to select this cell. How can I do this?
>
>Thanks,
>Jeff
JL
Jeff Lancaster
February 4, 2005 10:01 PM UTC
Thanks for the response. I had actually tried that approach but the problem with that is this: I have a lot of columns in my grid so horizontal scrolling is enabled. If I set GridStyleInfo.Enabled = False the column does show up on initial load and is not selected by arrow key navigation. However if I scroll to the right past the point where you can see the column, and then scroll back, the column is no longer visible. I want to be able to see the column, just not select it with the keyboard navigation.
Thanks,
Jeff
AD
Administrator
Syncfusion Team
February 6, 2005 07:57 PM UTC
Hi Jeff,
ok. I would still keep using the .Enabled flag but you should also try handling the QueryNextCurrentCellPosition event. In the event handler for that event you could set grid.LeftColIndex = 1 to scroll the first column into view.
Stefan
>Thanks for the response. I had actually tried that approach but the problem with that is this: I have a lot of columns in my grid so horizontal scrolling is enabled. If I set GridStyleInfo.Enabled = False the column does show up on initial load and is not selected by arrow key navigation. However if I scroll to the right past the point where you can see the column, and then scroll back, the column is no longer visible. I want to be able to see the column, just not select it with the keyboard navigation.
>
>Thanks,
>Jeff
JL
Jeff Lancaster
February 7, 2005 06:26 PM UTC
Thanks, Stefan.
That does seem to work, however it also causes an unwanted side effect. Each time I arrow to the right, the whole grid momentarily shifts all the way to the left, before repositioning itself to show the proper cell.
Any other suggestions?
Jeff
AD
Administrator
Syncfusion Team
February 7, 2005 07:21 PM UTC
Jeff,
you need to check the arguments that get provided by this event.
In your case you should look for CurrentCell.ColIndex = 2 and GridDirectionType.Left;
Stefan
>
>Thanks, Stefan.
>
>That does seem to work, however it also causes an unwanted side effect. Each time I arrow to the right, the whole grid momentarily shifts all the way to the left, before repositioning itself to show the proper cell.
>
>Any other suggestions?
>
>Jeff
JL
Jeff Lancaster
February 7, 2005 07:51 PM UTC
Thank you - that did the trick. By the way, I also had to check for ColIndex = 1 and GridDirectionType.Right (this was because I had set model.Options.WrapCell = True).