There are two important points here.
Firstly, in order to select back the previously saved items, RadGridView
expects a collection of the same data type that is within the collection bound to the ItemsSource
property. In your approach, you cast the items to "object" type and pass them through Select()
method, but the control is not meant to auto-cast the "object" type to the data type you are using within the ItemsSource
And secondly, If you want to select items through Select()
method, you will also need to set the SelectionMode
". Since the method accepts an IEnumerable
collection, internally the control ensures that the selection mode is not "Single
". Note, that this is the default value of the property.
If you are not comfortable with setting the SelectionMode
", you can set a single selected item through the "SelectedItem
" property of RadGridView
I am also attaching a sample project illustrating both approaches for your convenience.
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?
Telerik Feedback Portal
and vote to affect the priority of the items