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

Glossary Item Box

 WebGrid Events Global Functions

wgGetLastSelectedObject Description
Gets grid last selected object.

Return Value
object ( SelectedObject )
Samples
 
wgGetValidActiveCell Description
Gets the valid active cell of the grid.

Parameters
cell ( object - cell element )

Return Value

object ( cell element )

Samples
The sample shows how to get the valid active cell element of the column set.
// get the grid Object.
var grid = ISGetObject("WebGrid1");

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

//get the valid active cell from the selected object
var cell = wgGetValidActiveCell(rowElm.cells[2])
wgGetLastVisibleRow Description
Gets the last visible row of the selected object.

Parameters
tb ( object - table element )

Return Value

object (row element)

Samples
The sample shows how to get the last visible row of the grid

// 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 the last visible row
wgGetLastVisibleRow(tblElm)
wgGetLastChildVisibleRow Description
Gets the last child of the visible row (intended intended to be used for advanced developers only, because the row element needs to be specific).

Parameters
res ( object - row element)

Return Value

object ( row element )

Samples
 
wgGetPrevVisibleRow Description
Gets the previous visible row.

Parameters
tb ( object - table element )
    The table element of the table where the row is located in.
row ( object - row element)
The row element of the currently visible row.

Return Value

object ( row element )

Samples
The sample shows how to get the previous visible row 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 HTML row element.
var rowElm = grid.GetSelectedObject().GetRowObject().GetElement();

//get the previous visible row
var row = wgGetPrevVisibleRow(tblElm,rowElm)

©2012 Intersoft Solutions Corp. All Rights Reserved.