Ask a Question related to ASP.NET General, Design and Development.
-
Stu #1
Getting the data key field value when selecting a row in a datagrid...
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
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
Version: 6.0.505 / Virus Database: 302 - Release Date: 30/07/2003
Stu Guest
-
Selecting one particular field in the same Access database table?
Is there a way of selecting one particular field in the same Access database table? eg. database is - ID: 1 ... -
selecting datagrid row
Hello asp.net I've stuck a Select button from the property builder on my grid (Col 0). Upon click I'd like it to return the value in Col 1... -
datagrid with edit option selecting data
In asp.net web page that has a datagrid, how do you get the value from the selected edit textboxes? -
Selecting a row in datagrid
Hi, I want to use Datagrid with a button or any other way so that I can select one row that is required. Actually the database is searched for a... -
Datagrid Data Field question
My datagrid consist of a Bound Column where the Data Field = Origin. I would like the following Bound Column to display either Origin or... -
makthar #2
Getting the data key field value when selecting a row in a datagrid...
You can get the data key value from the ItemCommand event
when a user clicks on the datagrid select button. Then
use this value to do whatever you want.
dataset when I select>-----Original Message-----
>Hi,
>
>I am trying to return the data key field value from aa dataset.>a row in a datagrid after the datagrid has been bound tothe DataKey using the>
>When I an the Edit, Update and Cancel row I can returncannot use the>sub listed below. However, the select button does not have
>'DataGridCommandEventArgs' as one of it's parameters so IByVal e As>same command.
>
>-----------
>Public Sub UpdateCommand(ByVal sender As System.Object,Handles>System.Web.UI.WebControls.DataGridCommandEventArg s)30/07/2003>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
>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
>Version: 6.0.505 / Virus Database: 302 - Release Date:>
>
>.
>makthar Guest



Reply With Quote

