I am using a DataGrid in an ASP.NET page.
When someone clicks a row with their mouse, I want to fill in data on my form using info from that DataGrid’s Selected Row.
I have wired up the control’s SelectedIndexChanged event, but there does not seem to be any way to access the individual rows.
protected void DataGridRow_Selected(object sender, EventArgs e) {
var row = grid1. ???
}
Is there a way to do this?
I use Windows Forms mostly, so I could be missing something completely obvious to people who use WebForms on a more frequent basis.
You can use Ajax like JQuery to get the content of that grid cell and populate to your form field.