We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Skipping Selection of a cell when navigating grid

Thread ID:

Created:

Updated:

Platform:

Replies:

24493 Feb 4,2005 01:16 PM Feb 7,2005 02:51 PM Windows Forms 6
loading
Tags: GridControl
Jeff Lancaster
Asked On February 4, 2005 01:16 PM

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

Administrator [Syncfusion]
Replied On February 4, 2005 04:50 PM

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

Jeff Lancaster
Replied On February 4, 2005 05:01 PM

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

Administrator [Syncfusion]
Replied On February 6, 2005 02:57 PM

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

Jeff Lancaster
Replied On February 7, 2005 01:26 PM

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

Administrator [Syncfusion]
Replied On February 7, 2005 02:21 PM

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

Jeff Lancaster
Replied On February 7, 2005 02:51 PM

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).

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;