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

Is there no DataItem object?

1 Answer 137 Views
ListView
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 08 Aug 2010, 09:53 PM
My Listview is bound using an OpenAccess object, is there no way (Like the RadGrid) to get the DataItem back in the ItemCommand event?

I cant seem to locate it...the only thing I can think of is to pass in the data in some sort of csv on the CommandArgument...

Or do I have it wrong and it's not available in that event in either ListView or Grid?

Thanks,
Steve

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 12 Aug 2010, 07:28 AM
Hi Steve,

Into the RadListView.ItemCommand event handler you could get the RadListViewDataItem from e.ListViewItem property. For example:
void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
{
    RadListViewDataItem item = ((e.ListViewItem as RadListViewDataItem;
}
   
Additionally I am sending you a simple example which demonstrates the desired functionality.
I hope this helps.

All the best,
Radoslav
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
Tags
ListView
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Radoslav
Telerik team
Share this question
or