What the setCell command does in javascript

1

By the name implies that this command configures a cell in a table / grid. But I'm having trouble understanding its syntax mixed with asp .

<%If col_cod <> "" Then %>
    oGrid.setCell(<%=linha%>,'<%=col_cod%>',codigo);
<% End If %>

<%If col_nom <> "" Then %>
    oGrid.setCell(<%=linha%>,'<%=col_nom%>',descricao);
<% End If %>

It seems to populate the col_cod column with the value of codigo and col_nom with the value of Descricao , but it complicates the first parameter, which in this case is the value coming from asp to linha . So what exactly does it do?

    
asked by anonymous 20.08.2015 / 13:32

1 answer

4

The .setCell method creates a cell / column of a <td></td> table.

The first parameter represents the index of the ColumnIndex column.

The second parameter represents the index of the row (row) RowIndex .

The third parameter represents the contents of the column.

Note that these functions and methods do not belong to JavaScript. They are provided with a JavaScript library called "GridData".

link

    
20.08.2015 / 13:45