I needed to set the DataKeys property of my grid to the keyid of the underlying datasource. then I can get the value I want using
GridView1.SelectedDataKey.Value
>Hi
>
>I've got a grid on a webform. I'm using a Linqdatasource.
>
>The grid displays text items from the record but I want to trap the record id when a line is selected .
>
>I tried adding the record id to the grid as an invisible column but I don't get the record id then.
>
>Any suggestions on the best way to do this.
>
>
>Thanks
>
>
>Nick
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only