Question

How can I limit the number of selected (checked) items in a radTreeListView? Say after a user has selected (checked) 5 items, a stop them from checking/selecting more items in c#.

Which event to I need to handle?

Was it helpful?

Solution

Achivement:

 private void radTreeListView_SelectionChanging(object sender, Telerik.Windows.Controls.SelectionChangingEventArgs e)
    {
        if (radTreeListView.SelectedItems.Count >= 5 && e.AddedItems.Count>0)
            e.Cancel = true;
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top