are you using the SelectedIndexChanged event? try something like this (C#):
int userID = (int) myDataGrid.DataKeys[myDataGrid.SelectedIndex];
This assumes you have set the DataKeyField property of your grid. Think of
DataKeys as your collection of IDs, one ID per row.
Regards,
Stephen
"Gary" <> wrote in message
news:eCUB$...
> Hi,
> I have 7 columns on my datagrid, out of which one column (Column No 1) is
> hidden (which is containing User ID), and the Column No 3 is displaying
user
> Name.
> Now I have given hyperlink on Column no 3 (i.e User Name) & I want to pick
> up the data from Column no 1 (i.e User ID) when I click the hyperlink.
>
> Please let me know how this can be done.
>
> TIA,
> Gary
>
>
|