Spread for ASP.NET 7.0 Product Documentation
GetSheetColIndex
See Also Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > GetSheetColIndex

Glossary Item Box

Gets the SheetView column index for the specified column of the Spread on the displayed page.

Syntax

[JavaScript]

var ret = FpSpread1.GetSheetColIndex(column, innerRow);

Parameters

column
Integer, column index (on the client)
innerRow
Integer, row index when using row template mode (optional)

Return Type

Integer, index of the column in the sheet (SheetView object on the server)

Remarks

This method gets the column index of the SheetView object on the server for the specified column of the Spread object on the displayed page on the client. This method is useful when the control is using multiple-line columns mode (row layout) or there are hidden columns.

For example, in row layout mode, if the first column has two server columns: C (innerRow = 0) and E (innerRow = 1) and GetSheetColIndex(0, 0) is used, then the index for column C is returned.

Example

This is a sample that contains the method. On the client side, the script that contains the method would look like this:

JavaScript Copy Code
<SCRIPT language=javascript>
   function getColIx() {
       var scindx = FpSpread1.GetSheetColIndex(2);
       alert("Column index on server is " + scindx);
   }
</SCRIPT>

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.