Intersoft WebGrid Documentation
WebGrid ColumnSet
Send comments on this topic.
Intersoft WebGrid > Client-side References > WebGrid ColumnSet

Glossary Item Box

 WebGrid ColumnSet Global Functions

wgGetColumnSetRows Description
Gets the column set rows of specific row.

Parameters
row ( object )
The row element

Return Value

array

Samples
The sample shows how to get arrays of the columnset rows.

//get grid object
var grid = ISGetObject("WebGrid1");

//get row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the arrays contain columnset rows
var arr = wgGetColumnSetRows(rowElm)
wgGetLowestColumnSetRow Description
Gets the lowest column of the column set rows.

Parameters
obj ( object )
The row element

Return Value

object (row element)

Samples
The sample shows how to get the lowest columnset row element.

//get grid object
var grid = ISGetObject("WebGrid1");

//get row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the lowest column set row
wgGetLowestColumnSetRow(rowElm)
wgGetColumnSetRowByPos Description
Gets the row html element of the specified position in ColumnSet rows.

Parameters
obj ( object )
The table element
pos ( integer )
The row position

Return Value

object (row element)

Samples
The sample shows how to get row by position of the selected object.

// get the grid Object.
var grid = ISGetObject("WebGrid1");

// get HTML body of the table element.
var tblElm = grid.RootTable.GetElement(WG40.BODY,WG40.HTMLTABLE);

//get columnset row by position
wgGetColumnSetRowByPos(tblElm.rows,1)

wgGetColumnSetRow Description
Gets the first/root row HTML element of column set rows.

Parameters
obj ( object )
The row or cell element

Return Value

object (row or cell element)

Samples
The sample shows how to get the first HTML row element of the grid.

//get grid object
var grid = ISGetObject("WebGrid1");

//get row element of the grid object
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the HTML first row element.
var row1 = wgGetColumnSetRow(rowElm)
wgGetCSCellByPosition Description
Gets the ColumnSet cell by specified position.

Parameters
row ( object )
The row element
r ( integer )
The row position
c ( integer )
The column position
cs ( integer )
The column set position

Return Value

object (row element)

Samples
The sample shows how to get HTML cell element using positions of the row column.
//get grid object.
var grid = ISGetObject("WebGrid1");

//get row element object of the grid.
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get HTML cell element by using the row element and positions.
var cell = wgGetCSCellByPosition(rowElm,1,1,1)
wgGetCSCellByName Description
Gets the ColumnSet cell html element by column's name.

Parameters
row ( object )
The row element
name ( string )
The column name

Return Value

object (cell element)

Samples
The sample shows how to get a cell HTML element using lastname and row element.

//get grid object
var grid = ISGetObject("WebGrid1");

//get row element
var rowElm = grid.GetSelectedRow().GetRowObject().GetElement();

//get cell HTML element sorted by lastname with row element.
var cellname = wgGetCSCellByName(rowElm,"LastName")
wgGetCSPosByRL Description
Gets the column set position by row layout.

Parameters
rl ( object )
The row layout object

Return Value

object

Samples
The sample shows position of the ColumnSet using row layout.

//get the grid object.
var grid = ISGetObject("WebGrid1");

//get row element.
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get row layout by using column name, in this case we use "city".
var cityrl = grid.RootTable.GetRowLayoutByColName("City"); 

//get ColumnSet position by using row layout.
var pos = wgGetCSPosByRL(cityrl)
wgGetLastEditableCSCell Description
Gets the last editable ColumnSet cell.

Parameters
table ( object )
The table element
cs ( integer )
The column set position
row ( object )
The row element

Return Value

object (cell element)

Samples
 
wgGetPrevEditableCSCell Description
Gets previous editable column set cell.

Parameters
cell ( string )
The cell name
startcs ( integer )
The start count for searching

Return Value

object (cell element)

Samples
The sample shows how to get previous editable cell on the ColumnSet.

//get grid object
var grid =ISGetObject("WebGrid1");

//get row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the previous editable cell of the ColumnSet.
var cdcell = wgGetPrevEditableCSCell(rowElm.cells[1],1)
wgGetCSPrevEditableCell Description
Gets the previous editable cell in the column set.

Parameters
cell ( object )
The cell element
_row ( object )
The row element

Return Value

object (cell element)

Samples
The sample shows how to get the column set previous editable cell.
//get grid object
var grid = ISGetObject("WebGrid1");

//get row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get cell element with n is an integer
var cellElm = rowElm[n];

//get previous editable cell of columnset
var cell = wgGetCSPrevEditableCell(rowElm.cells[1],rowElm)
wgGetCSLastEditableCell Description
Gets the last editable cell in the column set.

Parameters
row ( object )
The row element

Return Value

object (cell element)

Samples
The sample shows how to get last editable cell of ColumnSet.
//get grid object
var grid = IsGetObject("WebGrid1");

//get the row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the last editable cell of the columnset
var crow = wgGetCSLastEditableCell(rowElm)
wgGetCSFirstEditableCell Description
Gets the first editable cell in the column set.

Parameters
row ( object )
The row element

Return Value

object (cell element)

Samples
The sample shows how to get the first editable cell on column set.

//get grid object
var grid = IsGetObject("WebGrid1");

//get the row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the first editable cell of the columnset
var crow = wgGetCSFirstEditableCell(rowElm)
wgGetCSPrevEditableRow Description
Gets the last editable row in the column set.

Parameters
hTbl ( object )
The table html element
cell ( object )
The cell element
csno ( integer )
The column set number
colno ( integer )
The column number
isMin ( boolean )
The status shows whether the grid is start from min or not

Return Value

object (row element)

Samples
The sample shows how to get the previous editable row in columnset using table element, cell element, columnset number, and column number.

//get the grid object
var grid = ISGetObject("WebGrid1");

//get table element
var tblElm = grid.RootTable.GetElement(WG40.BODY,WG40.HTMLTABLE);

//get row element
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get columnset previous editable row
wgGetCSPrevEditableRow(tblElm,rowElm.cells[1],1,1,false)
wgGetPrevCSRow Description
Gets the previous column set row.

Parameters
tb ( object )
The table element
row ( object )
The row element

Return Value

object (row element)

Samples
The sample shows how to get row of the previous column set row.
//get grid object
var grid = ISGetObject("WebGrid1");

//get table element of the grid
var tblElm = grid.RootTable.GetElement(WG40.BODY,WG40.HTMLTABLE);

//get row element of the grid
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement(); 

//get the previous columnset row
var row = wgGetPrevCSRow(tblElm,rowElm)
©2012 Intersoft Solutions Corp. All Rights Reserved.