This is a migrated thread and some comments may be shown as answers.

Select row with object

1 Answer 223 Views
GridView
This is a migrated thread and some comments may be shown as answers.
MaiK
Top achievements
Rank 1
Iron
MaiK asked on 26 Mar 2018, 07:26 AM

Hi there,

 

Is there any way to select a row in RadGridView using an object as index?

 

Thank you and Regards!

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Mar 2018, 02:04 PM
Hello, Mikel, 
  
If you need to select a row by its DataBoundItem for example, it would be necessary to iterate the RadGridView.Rows collection and find the row that holds that record. Then, considering its index you can select the desired row.

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Marc
Top achievements
Rank 1
Veteran
commented on 05 Oct 2022, 10:05 AM

Hello Dess,

is there a faster way to do this?
If I have to iterate over 10k rows and the searched value is at row 9k, it takes a long time.

Regards Marc

Dess | Tech Support Engineer, Principal
Telerik team
commented on 07 Oct 2022, 07:24 AM

Marc, there is no faster way to find a specific row than iterating the row. However, please have in mind that RadGridView offers search functionality which is highlights the found matches. This search logic is executed by a BackgroundWorker and it provides much faster experience. Additional information about this functionality is available here: 

https://docs.telerik.com/devtools/winforms/controls/gridview/rows/search-row

 I hope this helps.
Tags
GridView
Asked by
MaiK
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or