Hi there,
I'm trying to bind controls in my webApplication to a ViewModel class.
The binding itself works fine, but i got a problem, resolving the correct objects.
I bound a RadGrid to an ObjectDataSource, refering my class "PersonsViewModel"
The select-method is
Now I'd like to resolve the selectedItem for example:
My problem is, that items[0].DataItem is always null.
I don't get why, because the item is databound.
Any help would be apprechiated.
Thanks,
Thomas
I'm trying to bind controls in my webApplication to a ViewModel class.
The binding itself works fine, but i got a problem, resolving the correct objects.
I bound a RadGrid to an ObjectDataSource, refering my class "PersonsViewModel"
The select-method is
public List<Person> GetPersons() { return DataProvider.GetPeople(); }
Now I'd like to resolve the selectedItem for example:
var items = RadGrid1.SelectedItems; Person p = items[0].DataItem as Person;
My problem is, that items[0].DataItem is always null.
I don't get why, because the item is databound.
Any help would be apprechiated.
Thanks,
Thomas