Spread for ASP.NET 10 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > GetSheetColIndex |
Gets the SheetView column index for the specified column of the Spread on the displayed page.
[JavaScript]
var ret = FpSpread1.GetSheetColIndex(column, innerRow);
Integer, index of the column in the sheet (SheetView object on the server)
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.
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 type="text/javascript"> function getColIx() { var scindx = FpSpread1.GetSheetColIndex(2); alert("Column index on server is " + scindx); } </script> |