I am assuming you are using 2003, since you said datagrid.
Here is an extensive article that helped me:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspxI'm not sure exactly what part of the article your specific question falls into, but I am pretty sure it is in there somewhere.
>Hi Mike.
>I am using a Web Form.
>
>regards,
>Gerard
>
>
>>Are you using a Winform or a Webform? What version of .NET?
>>
>
>>>Hi.
>>>I have an 'Maintenance' page which is working fine to Add records.
>>>I also have a Search page which returns a Page with a DataGrid of selected records.
>>>I would like to be able to Click on a record in the dataGrid,and call the 'Maintenance ' page with the Primary key.
>>>Then in the Load of the Page, either enable the 'Add' or Modify button.
>>>
>>>My problem is I'm not sure how to add a column to the grid, so that when it is clicked, it calls the maintanace page with the Primary Key of the record.
>>>
>>>Any help appreciated
>>>
>>>(I've used the Edit in the dataGrid but there are too many fields to edit in a row)
>>>
>>>Regards,
>>>Gerard