Infragistics(R) NetAdvantage(R) Windows Forms
SelectType Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : SelectType Enumeration

Used to specify the type of selection that is allowed for an object.

Syntax

Visual Basic (Declaration) 
Public Enum SelectType 
   Inherits System.Enum
C# 
public enum SelectType : System.Enum 

Members

MemberDescription
Default Use Default. The setting of the object's parent will be used.
Extended Extended Select. Multiple objects may be selected at once.
ExtendedAutoDrag Strategy used when multiple items can be selected but pressing the left button and dragging does not select other items but instead starts dragging the selected item immediately.
None None. Objects may not be selected.
Single Single Select. Only one object may be selected at any time.
SingleAutoDrag Strategy used when only a single item can be selected and pressing the left button and dragging does not select other items but instead starts dragging the selected item immediately.

Example

Following code shows how to control row-selection in the UltraGrid.

Visual BasicCopy Code
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
C#Copy Code
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;

}

See Also