Results 1 to 2 of 2

Thread: Skipping A row in a datagridview

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    Question Skipping A row in a datagridview

    I have a datagrid view populated with hundreds of rows.Some of the rows have been flagged as been read only.As the user scolls thru the list using the down/up arrow I want the Readonly lines to be skipped ie, they should not get focus

  2. #2
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: Skipping A row in a datagridview

    I do something similar and what I do is use the CellEnter event as follows:

    VB Code:
    1. If dgv.Rows(e.RowIndex).Cells(e.ColumnIndex).ReadOnly Then
    2.     SendKeys.Send("{TAB}")
    3. End If

    It isn't the prettiest way to do it, but it works.

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