You can get a specific cell's text of selected row in client side.
This topic will show you how to get WebGrid's cell of selected row in WebGrid.
To get a specific cell of a selected row in WebGrid
- Drag WebGrid instance into the WebForm.
- Add a client side function on your code.
- Select a row.
- You can get the grid's specific cell by simply using:
-
JavaScript Copy Code function Button1_onclick()
{
var grid = ISGetObject("WebGrid1");
var row = grid.GetSelectedObject().GetRowObject();
var cells = row.GetCells();
alert(cells.GetNamedItem("ProductName").Text);
}
Other Resources
Walkthrough Topics
How-to Topics