How to select or highlight data grid row

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sujathaeeshan
    New Member
    • Feb 2008
    • 22

    How to select or highlight data grid row

    Hello all,

    I want to highlight or select data grid row based on first letter of first column in data grid with keyboard.

    Just by pressing the key of first letter of the column ,it has to highlight the respective row.

    For example,

    RST 1000 FFF
    FGH 2000 JJJ
    KLP 3000 KKK
    FST 4000 GGG

    grid will be having 4 rows like this,if user prees F then it has to highlight 2nd row,if he press F continuosly then its has to highlight the 4th row..like it has to search and Highlight all Rows that's having first column name starting with F.

    This feature is default for combo box list or list box .

    But how i will be able to provide the same functionality for Data Grid.


    Thanx,
    Suji
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I have been wondering if there was a nice way to do this myself.

    So far all I have been able to find was that you manually watch the keypresses and loop through the the data looking for a matching row and then select it

    Comment

    • sujathaeeshan
      New Member
      • Feb 2008
      • 22

      #3
      Can you please give an example ...
      for the selected alphabet it has to loop through the data for matching row

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Yeah pretty much, you watch the key presses and if the user presses 'a' you loop through your rows until you find one that starts with an 'a'

        Comment

        Working...