Bill

Bill

  • NA
  • 16
  • 0

ListView Single Range Selection

Mar 25 2008 10:25 AM
I have a ListView, and I'd like to only allow a single range to be selected. I need the equivalent of Java's SINGLE_SELECTION_INTERVAL ( http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/ListSelectionModel.html#SINGLE_INTERVAL_SELECTION ). For example:

If a ListView has 5 rows, #1,#2 could be selected, or #3,#4,#5, or just #3, but not #1,#3,#4.

Is there any way of adding this functionality in C# without getting heavily into rewriting the control?