Adding custom buttons to Datagrid

martin_d_bell

Newcomer
Joined
Oct 8, 2004
Messages
17
Hi,

I am having a hard time trying to add a custom button to a datagrid column. I have successfully added Edit, Update and cancel buttons which are set up by using the OnEdit, OnUpdate, OnCancel commands within the <asp:datagrid line of code. However I need to add a confirm button to the end column of my datagrid which when clicked updates a column in my SQL database with the value of "1".

If I use the OnClick event of the button I am unable to use the following code:

e.items.cells(0).text

I need to use this code to find the RecordID from the database which is stored in an invisible column (0) in the datagrid.

If any one can help it would be greatly appreciated. Thanks.

Martin
 
Coding in VB

P.S.

I probably should have mentioned that I am coding in VB.
Thanks

martin_d_bell said:
Hi,

I am having a hard time trying to add a custom button to a datagrid column. I have successfully added Edit, Update and cancel buttons which are set up by using the OnEdit, OnUpdate, OnCancel commands within the <asp:datagrid line of code. However I need to add a confirm button to the end column of my datagrid which when clicked updates a column in my SQL database with the value of "1".

If I use the OnClick event of the button I am unable to use the following code:

e.items.cells(0).text

I need to use this code to find the RecordID from the database which is stored in an invisible column (0) in the datagrid.

If any one can help it would be greatly appreciated. Thanks.

Martin
 
Back
Top