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?

Était-ce utile?

La 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;
    }
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top