Spread ASP.NET 17
Spread for ASP.NET 17 Product Documentation / Client-Side Scripting Reference / Scripting Members / Methods / GetSheetColIndex
In This Topic
    GetSheetColIndex
    In This Topic

    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.

    SheetView column index

    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 type="text/javascript">
       function getColIx() {
           var scindx = FpSpread1.GetSheetColIndex(2);
           alert("Column index on server is " + scindx);
       }
    </script>
    
    See Also