What I am trying to do is cancel the SelectedIndexChanged event in the list control, (which I know you cant). I know you can cancel the IndexChanging event, however it doesnt provide which item it is changing to, so that does no good.
I want the user to select an item from the list, then I get which item they selected, do some work, then reset the list control to nothing being selected again. So if they click the same item twice, i can "do something again", however if the item is selected already the event doesn't change.
The closest Ive been able to come is during the SelectedItemChanging event, is to change the ListControl SelectionMode = None, which removes the theme for the selected item, and sets all the selected Item, value, index, and active to the default values. GREAT...
Then switch it back to One, and all the no selected item default values are still there, Perfect...
However when you select the same Item again, the Items UI becomes selected again, but the SelectedItemChanged event does NOT fire again. I put a break point on the SelectedItemChanging event, and all the previous selected Item information was back again, NOT good,
I even re-bound the Event handler just in case it got cleared out to, still no luck.
Any better ideas?
Thanks
I want the user to select an item from the list, then I get which item they selected, do some work, then reset the list control to nothing being selected again. So if they click the same item twice, i can "do something again", however if the item is selected already the event doesn't change.
The closest Ive been able to come is during the SelectedItemChanging event, is to change the ListControl SelectionMode = None, which removes the theme for the selected item, and sets all the selected Item, value, index, and active to the default values. GREAT...
Then switch it back to One, and all the no selected item default values are still there, Perfect...
However when you select the same Item again, the Items UI becomes selected again, but the SelectedItemChanged event does NOT fire again. I put a break point on the SelectedItemChanging event, and all the previous selected Item information was back again, NOT good,
I even re-bound the Event handler just in case it got cleared out to, still no luck.
private void ListPlacesSelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
.....DO Something
this.listPlaces.ActiveItem = null;
this.listPlaces.SelectionMode = SelectionMode.None;
this.listPlaces.SelectionMode = SelectionMode.One;
this.listPlaces.SelectedIndexChanged += ListPlacesSelectedIndexChanged;
}
Any better ideas?
Thanks