I have a RadListView that binds and displays data correctly. In the ItemTemplate there is an edit button. When the user clicks the edit button I handle the ListViews OnItemEditing event.
In the EditItem template I have a txtbx(s) for the text values and a cmbo box for a list of choices for one of the data items. The combo box binds and displays choices just fine.
So I thought it would be nice to find in the combobox the current (i.e. ListView item that has been clicked to edit) matching option, display it (find in combo box list of choices and make it selected choice) and this is where I hit my snag. I can't seem to get a handle on the DataItem....well actually I can and it is null???
My reading while trying to solve reveals that the list is technically not yet in "edit" mode. If that is the case then does that mean the data item is not yet populated? This would explain why my data item is empty but then I can't find any other event to handle to achieve my objective?
...<snip>... OnItemEditing="ExPrgmLstVw_ItemEditing" >
....Layout Template, ItemTemplate, EditTemplate, Insert Template......
protected void ExPrgmLstVw_ItemEditing(object sender, RadListViewCommandEventArgs e)
RadListViewDataItem itm = (RadListViewDataItem) e.ListViewItem;
Here is the SO question as well so get yourself some SO points too! I have a screenshot here with the debugger showing my empty data item.
So in summary I just need to know how to id the item being clicked for editing etc. so I can get at the data values for that item.