Posted on Jan 7, 2010 (permalink)
Reply
Once you have found the data item you just need to set it as SelectedItem and it will be selected. For example:
var itemToSelect = (((System.Data.DataView)RadGridView1.ItemsSource).Table.Select(
"ActivityName like '%"
+ txtSearch.Text +
"%' "
)[0]);
this
.myGrid.SelectedItem = itemToSelect;
I guess that either the itemToSelect is null or it is not present in the ItemsSource that the grid is bound to. Since you are using a DataView I guess the grid is bound to a list of DataRowView items. If that is the case you will need to find the corresponding DataRowView (the Select method return a DataRow) item and set this item as SelectedItem.
Back to Top
[ WPF Grid Features | Documentation | Demos | Telerik TV | Self-Paced Trainer ]
Powered by Sitefinity ASP.NET CMS
Contact Us | Site Feedback | Terms of Use | Privacy Policy Telerik fanpage on Facebook Telerik updates on Twitter Telerik company page on LinkedIn Telerik on Google+ Copyright © 2002-2012 Telerik. All rights reserved.