Use wgGetCellByName function to get WebGrid cell by name in client side.
This topic will show you how to get WebGrid's cell using wgGetCellByName.
To get WebGrid's cell by name
- Drag WebGrid instance into the WebForm.
- Add a client side function on your code.
- You can get the grid's cell by name simply by using:
-
JavaScript Copy Code function GetCellContents()
{
var grid = ISGetObject("WebGrid1");
var wgRow = grid.RootTable.GetRow(0);
var htmlRow = wgRow.GetElement();
alert(wgGetCellByName(htmlRow, "Country").innerText);
return true;
}
Other Resources
Walkthrough Topics
How-to Topics