S
Stu
Hi,
I am trying to return the data key field value from a dataset when I select
a row in a datagrid after the datagrid has been bound to a dataset.
When I an the Edit, Update and Cancel row I can return the DataKey using the
sub listed below. However, the select button does not have
'DataGridCommandEventArgs' as one of it's parameters so I cannot use the
same command.
-----------
Public Sub UpdateCommand(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.UpdateCommand
Response.Write("The datakey for this row is:" &
DataGrid1.DataKeys(e.Item.ItemIndex).ToString)
End Sub
-----------
Anybody any ideas?
Thanks in advance,
Stu
I am trying to return the data key field value from a dataset when I select
a row in a datagrid after the datagrid has been bound to a dataset.
When I an the Edit, Update and Cancel row I can return the DataKey using the
sub listed below. However, the select button does not have
'DataGridCommandEventArgs' as one of it's parameters so I cannot use the
same command.
-----------
Public Sub UpdateCommand(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.UpdateCommand
Response.Write("The datakey for this row is:" &
DataGrid1.DataKeys(e.Item.ItemIndex).ToString)
End Sub
-----------
Anybody any ideas?
Thanks in advance,
Stu