Is there no DataItem object?

2 posts, 0 answers
  1. Steve
    Steve avatar
    1871 posts
    Member since:
    Dec 2008

    Posted 08 Aug 2010 Link to this post

    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?

  2. Radoslav
    Radoslav avatar
    1564 posts

    Posted 12 Aug 2010 Link to this post

    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,
    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
Back to Top