I've got an .aspx page containing five DataGrids. I'd like to be able to handle the various events for these grids in common codebehind sub procedures.
For example, I want to have a sub procedure called EditGridRow() in the codebehind, and give each <asp: datagrid> element in the .aspx page the attribute OnEditCommand="EditGridRow".
Question is, how do I determine which DataGrid fired the event?
I know that the EditGridRow procedure will expect a source Object object and a DataGridCommandEventArgs object, but is it possible to determine the identity of the DataGrid itself from one of these two objects?
Thanks!
Mark
For example, I want to have a sub procedure called EditGridRow() in the codebehind, and give each <asp: datagrid> element in the .aspx page the attribute OnEditCommand="EditGridRow".
Question is, how do I determine which DataGrid fired the event?
I know that the EditGridRow procedure will expect a source Object object and a DataGridCommandEventArgs object, but is it possible to determine the identity of the DataGrid itself from one of these two objects?
Thanks!
Mark