Initializes a new instance of the
SelectionRange class specifying sorting and filtering criteria. This constructor is to be used when a start and/or end needs to be specified for the
SelectionRange (see
StartRangeInfos and
EndRangeInfos properties).
Additional examples that demonstrate how to select data programmatically can be found in the
Selecting Data topic.
Dim range As New SelectionRange( New SortDescription() { New SortDescription( "ShipCountry", ListSortDirection.Ascending ) }, Nothing, Nothing)
range.StartRangeInfos.Add( "ShipCountry", "Germany" )
range.EndRangeInfos.Add( "ShipCountry", "Germany" )
Me.sllbListBox.SelectedRanges.Clear()
Me.sllbListBox.SelectedRanges.Add( range )
SelectionRange range = new SelectionRange( new SortDescription[] { new SortDescription( "ShipCountry", ListSortDirection.Ascending ) }, null, null );
range.StartRangeInfos.Add( "ShipCountry", "Germany" );
range.EndRangeInfos.Add( "ShipCountry", "Germany" );
this.sllbListBox.SelectedRanges.Clear();
this.sllbListBox.SelectedRanges.Add( range );
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2