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

Returns or sets a value that determines how cell buttons are displayed for a column's cells.

Syntax

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

Example

Following code sets the ButtonDisplayStyle property on a column to always show buttons in its cells. Buttons inlcude drop down arrow buttons as well as edit buttons and regular buttons.

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

  Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button6.Click

      ' ButtonDisplayStyle property off the column dictates when the buttons in cells of
      ' that column are displayed. By default buttons are displayed whenever the user
      ' moves mouse over the cell. You can set this property to Always to make the
      ' UltraGrid always display the buttons. Buttons inlcude drop down arrow buttons
      ' as well as edit buttons and regular buttons.

      Dim column As UltraGridColumn = Me.UltraGrid1.DisplayLayout.Bands(1).Columns("OrderDate")

      column.ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always

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

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

	// ButtonDisplayStyle property off the column dictates when the buttons in cells of
	// that column are displayed. By default buttons are displayed whenever the user
	// moves mouse over the cell. You can set this property to Always to make the
	// UltraGrid always display the buttons. Buttons inlcude drop down arrow buttons
	// as well as edit buttons and regular buttons.

	UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[1].Columns["OrderDate"];

	column.ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;

}

Remarks

This property is used to indicate how cell buttons are displayed for the cells of a column. Setting 1 (ButtonDisplayStyleAlways) always displays the buttons while the other settings cause the buttons to be displayed only as a result of user interaction with the control.

This property only has an effect if the column's Style property is set to 2 (StyleEditButton), 4 (StyleDropDown), 5 (StyleDropDownList), 6 (StyleDropDownValidate), 7 (StyleDropDownButton), or 8 (StyleDropDownCalendar).

See Also