CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2008
    Posts
    1

    Re: Setting Selected Index on DataGridView Combobox

    i want to set tabindex for datagridview cell how to solve this problems

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Setting Selected Index on DataGridView Combobox

    [ Split Thread ]

  3. #3
    Join Date
    Aug 2005
    Location
    Imperial College London, England
    Posts
    490

    Re: Setting Selected Index on DataGridView Combobox

    As far as I'm aware, you can't change the tab order of cells in a DataGridView - the DataGridViewCell does not have a TabIndex property to start with.
    Is there any reason you wish to do so - I can't think of a situation where you want to go in any other order than Row and Columns or Columns and Rows...
    Help from me is always guaranteed!*
    VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
    Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.

    *Guarantee may not be honoured.

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Setting Selected Index on DataGridView Combobox

    You could always manipulate the DataGridView.CurrentCell property upon pressing of the Tab key, something like :
    Code:
    DataGridView1.CurrentCell = DataGridView1.Item(column, row)
    Of course, this assumes you already determined that Tab was pressed.

    But why is this necessary ¿

  5. #5
    Join Date
    Apr 2006
    Posts
    220

    Re: TabIndex on DataGridView Cell

    One way is that you try to capture KeyDown event on DataGridView and then manipulate the CurrentCell using Hannes idea. The other way might be to override 'ProcessCmdKey' method on grid.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured