Accessing Datagrid Cells on OnClick Postback

J

John Walker

Hi,
I have a datagrid which has a link button template column. In the 'on
click' event of this link button - which does a postback - I need to
reference the value of another control on the same row on which the link
button was clicked. Is there an easy way to do that?
Thanks,
John
 
P

Phillip Williams

Protected Sub DataGrid1_Command(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs) Handles datagrid1.ItemCommand
'use the e.Item.Cells collection to refer to any column on this row
'use the e.Item.FindControl (ControlID) to find a named control
within a template
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top