Spread ASP.NET 6.0 Product Documentation
DataIndex Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > LayoutCell Class : DataIndex Property


Glossary Item Box

Gets or sets the index of the viewport of a layout cell.

Syntax

Visual Basic (Declaration) 
Public Property DataIndex As Integer
Visual Basic (Usage)Copy Code
Dim instance As LayoutCell
Dim value As Integer
 
instance.DataIndex = value
 
value = instance.DataIndex
C# 
public int DataIndex {get; set;}

Property Value

Integer index

Example

This example assigns a layout mode for the column headers.
C#Copy Code
FpSpread1.ActiveSheetView.ColumnCount = 5
FpSpread1.ActiveSheetView.LayoutMode = FarPoint.Web.Spread.SheetView.LayoutModeType.RowTemplateLayoutMode;
FpSpread1.ActiveSheetView.RowTemplate.ColumnCount = FpSpread1.ActiveSheetView.ColumnCount;
FpSpread1.ActiveSheetView.RowTemplate.RowCount = 3;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 0].ColumnSpan = 2;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 0].LayoutColumn.Width = 15;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 0].LayoutRow.Height = 15;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 0].DataIndex = 1;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 0].RowSpan = 3;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 1].DataIndex = 0;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[1, 1].DataIndex = 2;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[1, 1].RowSpan = 2;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 2].DataIndex = 3;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[2, 2].DataIndex = 4;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 3].DataIndex = 5;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 3].RowSpan = 2;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[2, 3].DataIndex = 6;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[0, 4].DataIndex = 9;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[1, 4].DataIndex = 8;
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells[2, 4].DataIndex = 7;
Visual BasicCopy Code
FpSpread1.ActiveSheetView.ColumnCount = 5
FpSpread1.ActiveSheetView.LayoutMode = FarPoint.Web.Spread.SheetView.LayoutModeType.RowTemplateLayoutMode
FpSpread1.ActiveSheetView.RowTemplate.ColumnCount = FpSpread1.ActiveSheetView.ColumnCount
FpSpread1.ActiveSheetView.RowTemplate.RowCount = 3
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 0).ColumnSpan = 2
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 0).LayoutColumn.Width = 15
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 0).LayoutRow.Height = 15
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 0).DataIndex = 1
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 0).RowSpan = 3
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 1).DataIndex = 0
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(1, 1).DataIndex = 2
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(1, 1).RowSpan = 2
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 2).DataIndex = 3
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(2, 2).DataIndex = 4
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 3).DataIndex = 5
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 3).RowSpan = 2
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(2, 3).DataIndex = 6
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(0, 4).DataIndex = 9
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(1, 4).DataIndex = 8
FpSpread1.ActiveSheetView.RowTemplate.LayoutCells(2, 4).DataIndex = 7

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.