The MaxSelectedRows property determines the maximum number of rows that can be selected at any one time in the band or the grid controlled by the specified override. This is an UltraGridOverride object property that can apply at either the grid level or the band level. When set at the band level, it determines how many rows may be simultaneously selected within the band. When applied at the grid level, it determines how many rows may be simultaneously selected in the entire control. The grid-level setting will override any band-level settings.
Setting MaxSelectedRows to 0 means there is no limit to the number of rows that may be selected simultaneously. Setting this property to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
This property operates independently of any row scrolling regions.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button48_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button48.Click ' Set the SelectTypeRow to Single so only a single row can be selected at a ' time. Setting it on the layout's Override applies it to the whole grid. Me.UltraGrid1.DisplayLayout.Override.SelectTypeRow = SelectType.Single ' You can override the grid-wide setting (setting on the layout's Override) on a ' particular band by setting the associated properties on that band's Override. ' Following code sets the SelectTypeRow on the band 0 override to allow the user ' to select multiple rows that band. Me.UltraGrid1.DisplayLayout.Bands(0).Override.SelectTypeRow = SelectType.Extended ' You can set the MaxSelectedRows to limit the number of rows the user can select. Me.UltraGrid1.DisplayLayout.Bands(0).Override.MaxSelectedRows = 100 End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button48_Click(object sender, System.EventArgs e) { // Set the SelectTypeRow to Single so only a single row can be selected at a // time. Setting it on the layout's Override applies it to the whole grid. this.ultraGrid1.DisplayLayout.Override.SelectTypeRow = SelectType.Single; // You can override the grid-wide setting (setting on the layout's Override) on a // particular band by setting the associated properties on that band's Override. // Following code sets the SelectTypeRow on the band 0 override to allow the user // to select multiple rows that band. this.ultraGrid1.DisplayLayout.Bands[0].Override.SelectTypeRow = SelectType.Extended; // You can set the MaxSelectedRows to limit the number of rows the user can select. this.ultraGrid1.DisplayLayout.Bands[0].Override.MaxSelectedRows = 100; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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