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

An object that represents a single column of data.

Syntax

Visual Basic (Declaration) 
Public Class UltraGridColumn 
   Inherits Infragistics.Shared.KeyedSubObjectBase
   Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.CalcEngine.IFormulaProvider, Infragistics.Win.CalcEngine.IFormulaProviderEx, Infragistics.Win.IEditType, Infragistics.Win.IValueListsCollectionProvider, Infragistics.Win.Layout.IGridBagConstraint, Infragistics.Win.Layout.ILayoutChildItem, Infragistics.Win.Layout.ILayoutItem, IProvideRowLayoutColumnInfo 
C# 
public class UltraGridColumn : Infragistics.Shared.KeyedSubObjectBase, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.CalcEngine.IFormulaProvider, Infragistics.Win.CalcEngine.IFormulaProviderEx, Infragistics.Win.IEditType, Infragistics.Win.IValueListsCollectionProvider, Infragistics.Win.Layout.IGridBagConstraint, Infragistics.Win.Layout.ILayoutChildItem, Infragistics.Win.Layout.ILayoutItem, IProvideRowLayoutColumnInfo  

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

The Column property of an object refers to a specific column in the grid as defined by an UltraGridColumn object. You use the Column property to access the properties of a specified UltraGridColumn object, or to return a reference to an UltraGridColumn object.

An UltraGridColumn object represents a single column in the grid. The UltraGridColumn object is closely linked with a single underlying data field that is used to supply the data for all the cells in the column (except in the case of unbound columns, which have no underlying data field). The UltraGridColumn object determines what type of interface (edit, dropdown list, calendar, etc.) will be used for individual cells, as well as controlling certain formatting and behavior-related settings, such as data masking, for the cells that make up the column.

See Also