radgridview character "search"

2 Answers 115 Views
GridView
darin
Top achievements
Rank 1
Iron
Iron
darin asked on 05 Apr 2022, 08:19 PM

I thought there was a way on a radgridview that the user could hit B and be taken to the first entry where the B is. I thought i saw that the gridview was able to do that, but it doesn't seem to be working for me. It might be that i need to setup a custom keydown, not sure.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 06 Apr 2022, 11:29 AM

Hello Darin,

Thank you for your interest in our RadGridView control for WinForms.

The control does not provide such behavior out of the box. To search for a specific row, you can consider using the Search Row functionality of the control. You could search for a specific string by typing it in the search row textbox. If such string is found the control will highlight it in the cells. You could search only in specific columns or in all columns depending on the user requirement. I think that this functionality will work for you.

May I ask you to give it a try and let me know if it is suitable for you?

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

darin
Top achievements
Rank 1
Iron
Iron
commented on 07 Apr 2022, 11:51 AM

Yes, i know about the search row function that you have. I was just looking for a way to hit A and it moves to the first row where A is in the first column quickly without having to click on the search box and type A. I thought i had seen some code on how to do that.
0
Dinko | Tech Support Engineer
Telerik team
answered on 08 Apr 2022, 10:21 AM

Hi Darin,

You could achieve this approach by using custom code. By subscribing to the KeyPress event, you can get the pressed letter and search for such row in the Items collection of the RadGridView. If such a row is found, set the CurrentRow property of the control. Setting this property, the control will try to bring it into the view. I have prepared a sample solution to demonstrate what I have in mind. You can use it as a starting point to implement your scenario.

I hope that you find this project helpful.

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
darin
Top achievements
Rank 1
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or