Results 1 to 7 of 7

Thread: [2008] Datagridview : hotkeys go to row

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    [2008] Datagridview : hotkeys go to row

    How can I get my datagridview to respond to hotkeys ?

    If hotkey = numeric keypad "1" then goto dgv row 1

    or go to row containing "string"

    Thanks for any help.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Datagridview : hotkeys go to row

    anyone ?

  3. #3
    Hyperactive Member mrmojorisin's Avatar
    Join Date
    Oct 2007
    Location
    London Town Vocation: Garden Cricket Genuis
    Posts
    439

    Re: [2008] Datagridview : hotkeys go to row

    Is the table bound? JM was just explaing to me how you may be able to use the BindingSource for this sort of thing.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Datagridview : hotkeys go to row

    I can arrange it so that it is bound to a tempTable. My question is more how to get datagridview to respond to hotkeys like set focus/autoscroll to a particular row containing...

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Datagridview : hotkeys go to row

    anyone ?

  6. #6
    Hyperactive Member kuldevbhasin's Avatar
    Join Date
    Mar 2008
    Location
    Mumbai, India
    Posts
    493

    Re: [2008] Datagridview : hotkeys go to row

    u can bind the table and go to a position
    Code:
    Dim myBindingMainBase As BindingManagerBase
    Dim dTable As DataTable
    Dim da_adapter As New OleDbDataAdapter("string ", Connection)
    da_adapter.Fill(ds_dataset, "tablename")
    dTable = ds_dataset.Tables(0)
    dgDataGrid.DataSource = ds_dataset.Tables(0)
    myBindingMainBase = BindingContext(ds_dataset.Tables(0))
    myBindingMainBase.Position = 0
    you can give mybindingmanibase.position = ___ where __ is the position returned by ur hotkey

    hope this helps u out...would b glad if i was a help to anyone as this forum has really helped me a lot...

  7. #7
    Lively Member
    Join Date
    May 2008
    Posts
    117

    Re: [2008] Datagridview : hotkeys go to row

    Quote Originally Posted by Xancholy
    How can I get my datagridview to respond to hotkeys ?

    If hotkey = numeric keypad "1" then goto dgv row 1

    or go to row containing "string"
    I dont understand the question:

    shall it be able only to go to the rows (numpad "0" to numpad "9")?

    from where the "string" will come? In what Column do u want to look for "string"?
    whats the benefit of beeing rated?


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