By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,219 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,219 IT Pros & Developers. It's quick & easy.

How to select or highlight data grid row

P: 22
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 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.

Nov 12 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 7,872
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
Nov 12 '08 #2

P: 22
Can you please give an example ...
for the selected alphabet it has to loop through the data for matching row
Nov 13 '08 #3

Expert 5K+
P: 7,872
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'
Nov 13 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.