How do I get the selected row on the WebDataGrid on a button click, client side?
Hi khoke,
You could do this using javascript code, similar to the following:
function buttonClicked() {
var grid = $find("WebDataGrid1");
//Gets the selected row
var selectedRow = grid.get_behaviors().get_selection().get_selectedRows(0);
//Gets the text from the first cell of the selected row
var firstCell = selectedRow.getItem(0).get_cell(0).get_text();
alert(firstCell);
}
If you have any further questions, please feel free to contact me.
Hello khoke,
Please let me know if you have any further questions.