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

Returns or sets a value that indicates what will occur when a cell is clicked.

Syntax

Visual Basic (Declaration) 
Public Property CellClickAction As CellClickAction
C# 
public CellClickAction CellClickAction {get; set;}

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

The CellClickAction property specifies what will occur when the user navigates through the grid by clicking on cells in the band or the grid controlled by the specified override. You can choose whether cells that are clicked will put the cell into edit mode or select the cell or its row. Depending on your application, you may want to enable the user to edit any cell just by clicking on it, or you may want to require a separate action to trigger cell editing, such as double-clicking or a keystroke combination. Similarly, you can choose whether cells should be individually selectable, or if selecting the row is a sufficient response to clicking on a cell.

See Also