Use keyValue property to get WebGrid keyValue of a selected row in client side.
This topic will show you how to get WebGrid's keyValue.
To get WebGrid's row KeyValue
- Drag WebGrid instance into the WebForm.
- Add a client side function on your code.
- Select a row.
- You can get the grid's selected row KeyValue by simply using:
-
JavaScript Copy Code function doRowSelect()
{
var webGrid = ISGetObject("WebGrid1");
var selRow = webGrid.GetSelectedObject().GetRowElement();
alert(selRow.keyValue);
}
Other Resources
Walkthrough Topics
How-to Topics