Hi,
Firing a RowDataBound event, my question is how do I pull out the DataKey for GridviewRowEventArgs e?
I have a table of Publications and surprisingly enough the key is PublicationID, however I do not have a boundfield to publication id but have it specified as a datakeyname. I can get the information using:
int pID =Convert.ToInt32(DataBinder.Eval(e.Row.DataItem,"PublicationID"));
But was wondering if there is a more elegant way of getting the information?!
Also, if I investigate e, i can see the underlying table (publication) which also has a child table owner, does anybody know how I could, from the point in the app i.e. inside the RowDataBound event pull information out of the child table?
This is all .Net 3.0, C#.
Thanks, R.