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

Used to specify how a cell should react to being clicked.

Syntax

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

Members

MemberDescription
CellSelectCell Select. Selects and highlights the cell that was clicked. Note that if a cell is displaying a drop down button the clicking onto it will cause the cell to go into edit mode. To prevent the cell from going into edit mode see UltraGridColumn.CellActivation. To prevent the drop down buttons from showing, set the UltraGridColumn.ButtonDisplayStyle property.
Default Use Default. The setting of the object's parent will be used (Edit if parent has no default.)
Edit Edit. Selects and highlights the cell that was clicked and puts it in edit mode.
EditAndSelectText Edit and Select Text. Puts the cell into edit mode and selects its text, if any.
RowSelectRow Select. Selects and highlights the entire row of the cell that was clicked. Note that if a cell is displaying a drop down button the clicking onto it will cause the cell to go into edit mode. To prevent the cell from going into edit mode see UltraGridColumn.CellActivation. To prevent the drop down buttons from showing, set the UltraGridColumn.ButtonDisplayStyle property.

Example

Following code sets the CellClickAction property on the layout's override and the band's override.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button34_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button34.Click

      ' CellClickAction indicates the action taken by the UltraGrid when the user clicks
      ' on a cell. By default, the UltraGrid goes into edit mode.

      ' Set the CellClickAction on the layout's Override to RowSelect. With RowSelect,
      ' when the user clicks on a cell, the associated row gets selected.
      Me.UltraGrid1.DisplayLayout.Override.CellClickAction = CellClickAction.RowSelect

      ' You can override that grid-wide setting for a particular band by setting it on the
      ' override of that band.
      Me.UltraGrid1.DisplayLayout.Bands(0).Override.CellClickAction = CellClickAction.CellSelect

  End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button34_Click(object sender, System.EventArgs e)
{

	// CellClickAction indicates the action taken by the UltraGrid when the user clicks
	// on a cell. By default, the UltraGrid goes into edit mode.

	// Set the CellClickAction on the layout's Override to RowSelect. With RowSelect,
	// when the user clicks on a cell, the associated row gets selected.
	this.ultraGrid1.DisplayLayout.Override.CellClickAction = CellClickAction.RowSelect;

	// You can override that grid-wide setting for a particular band by setting it on the
	// override of that band.
	this.ultraGrid1.DisplayLayout.Bands[0].Override.CellClickAction = CellClickAction.CellSelect;

}

Remarks

CellClickAction enum is used for specifying the Override's UltraGridOverride.CellClickAction and Column's UltraGridColumn.CellClickAction properties.

See Also