Version

GridSettings Property

Returns a GridSettings instance which determines grid-specific properties of the task, such as the appearance of the row and the settings for the cells.
Syntax
'Declaration
 
Public ReadOnly Property GridSettings As Infragistics.Win.UltraWinGanttView.GridSettings
public Infragistics.Win.UltraWinGanttView.GridSettings GridSettings {get;}
Example
This sample code illustrates the customization options available on the grid section of the control.

Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinGanttView


Private Sub GridSettings_Load(ByVal sender As Object, ByVal e As EventArgs) Handles GridSettings.Load
    ' Set the default appearance for all cells within the grid area of GanttView 
    Me.ultraGanttView1.GridSettings.CellAppearance.BackColor = Color.BlanchedAlmond 
    
    ' Set the default appearance for all column headers within the grid area of GanttView 
    Me.ultraGanttView1.GridSettings.ColumnHeaderAppearance.ThemedElementAlpha = Alpha.Transparent 
    Me.ultraGanttView1.GridSettings.ColumnHeaderAppearance.BackColor = Color.Gray 
    
    ' Set the Visible position of ‘Resource Names’ column in the grid area of GanttView to 1 
    Me.ultraGanttView1.GridSettings.ColumnSettings(TaskField.Resources).VisiblePosition = 1 
    
    ' Set the default appearance for cells in the Duration column in the grid area of GanttView 
    Me.ultraGanttView1.GridSettings.ColumnSettings(TaskField.Duration).CellAppearance.BackColor = Color.Plum 
    
    ' Set the appearance of the row selctors in the grid area of GanttView 
    Me.ultraGanttView1.GridSettings.RowSelectorAppearance.BackColor = Color.SkyBlue 
    
    ' Set Row selector style in grid area of GanttView 
    Me.ultraGanttView1.GridSettings.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.ColumnChooserButtonFixedSize 
    
    ' Set the default row appearance for a specific task in the grid area of GanttView 
    Me.ultraGanttView1.CalendarInfo.Tasks(0).GridSettings.RowAppearance.BackColor = Color.Gray 
    
    ' Set the default cell appearance for a specific Task under a specific column in the grid area of GanttView 
    Me.ultraGanttView1.CalendarInfo.Tasks(0).Tasks(0).GridSettings.CellSettings(TaskField.Name).Appearance.BackColor = Color.Lime 
    
    ' Disable column moving in the grid area of GanttView 
    Me.ultraGanttView1.GridSettings.AllowColumnMoving = False 
    
    ' Set the selection overlay settings for a selected row in the grid area of GanntView 
    Me.ultraGanttView1.GridSettings.SelectionOverlayBorderColor = Color.Red 
    Me.ultraGanttView1.GridSettings.SelectionOverlayBorderThickness = 4 
        
        
    Me.ultraGanttView1.GridSettings.SelectionOverlayColor = Color.Green 
End Sub
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinGanttView;

 private void GridSettings_Load(object sender, EventArgs e)
 {
		// Set the default appearance for all cells within the grid area of GanttView
		this.ultraGanttView1.GridSettings.CellAppearance.BackColor = Color.BlanchedAlmond;

		// Set the default appearance for all column headers within the grid area of GanttView
		this.ultraGanttView1.GridSettings.ColumnHeaderAppearance.ThemedElementAlpha = Alpha.Transparent;
		this.ultraGanttView1.GridSettings.ColumnHeaderAppearance.BackColor = Color.Gray;

		// Set the Visible position of ‘Resource Names’ column in the grid area of GanttView to 1
		this.ultraGanttView1.GridSettings.ColumnSettings[TaskField.Resources].VisiblePosition = 1;

		// Set the default appearance for cells in the Duration column in the grid area of GanttView
		this.ultraGanttView1.GridSettings.ColumnSettings[TaskField.Duration].CellAppearance.BackColor = Color.Plum;

		// Set the appearance of the row selctors in the grid area of GanttView
		this.ultraGanttView1.GridSettings.RowSelectorAppearance.BackColor = Color.SkyBlue;

		// Set Row selector style in grid area of GanttView
		this.ultraGanttView1.GridSettings.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.ColumnChooserButtonFixedSize;

		// Set the default row appearance for a specific task in the grid area of GanttView
		this.ultraGanttView1.CalendarInfo.Tasks[0].GridSettings.RowAppearance.BackColor = Color.Gray;

		// Set the default cell appearance for a specific Task under a specific column in the grid area of GanttView 
		this.ultraGanttView1.CalendarInfo.Tasks[0].Tasks[0].GridSettings.CellSettings[TaskField.Name].Appearance.BackColor = Color.Lime;

		// Disable column moving in the grid area of GanttView
		this.ultraGanttView1.GridSettings.AllowColumnMoving = false;

		// Set the selection overlay settings for a selected row in the grid area of GanntView
		this.ultraGanttView1.GridSettings.SelectionOverlayBorderColor = Color.Red;
		this.ultraGanttView1.GridSettings.SelectionOverlayBorderThickness = 4;
		this.ultraGanttView1.GridSettings.SelectionOverlayColor = Color.Green;


 }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also