Back

FIX. RadListView - ActiveEditor shouldn't be null in the ItemValueChanging

To reproduce: run the attached sample project. Select an item and press F2, select a new item from the drop-down. You will encounter an error because the ActiveEditor is now null in the ItemValueChanging event.

Workaround: in the EditorInitialized event you can subscribe to the RadDropDownListElement.SelectedIndexChanging event:

private void radListView1_EditorInitialized(object sender, ListViewItemEditorInitializedEventArgs e)
{
ListViewDropDownListEditor editor = e.Editor as ListViewDropDownListEditor;
if (editor==null)
{
return;
}
RadDropDownListElement dropdown = (RadDropDownListElement)editor.EditorElement;
dropdown.SelectedIndexChanging-=dropdown_SelectedIndexChanging;
dropdown.SelectedIndexChanging+=dropdown_SelectedIndexChanging;
}


Attachments (1)

    
» Post Comment

Comments (2)

 
No comments, yet. Be the first!

Post Comment

Your Comment :
Commenting is disabled when the portal is unlicensed.
Select...