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

Finding row containing text

2 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
wdudek
Top achievements
Rank 1
wdudek asked on 20 Jun 2010, 05:02 PM
I have a grid that contains information about books, (title, author, isbn), how can I programatically find a row containing and isbn and select that row? I tried looking for a rows collection but couldn't seem to find one? Also I don't see a way to select an individual row?

Thanks

Bill

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 21 Jun 2010, 06:29 AM
Hello,

 You can use Items collection instead and assign desired item to SelectedItem. 

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
wdudek
Top achievements
Rank 1
answered on 21 Jun 2010, 02:27 PM
Thanks that did it, and was much easier than what I was expecting.

//TitleResults is the Data Grid  
TitleData title;  
                    foreach (var titleItem in TitleResults.Items)  
                    {  
                        title = (TitleData)titleItem;  
 
                        if (title.ISBN == isbn)  
                        {  
                            TitleResults.SelectedItem = titleItem;  
                            break;  
                        }  
                    } 
Tags
GridView
Asked by
wdudek
Top achievements
Rank 1
Answers by
Vlad
Telerik team
wdudek
Top achievements
Rank 1
Share this question
or