Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get value from asp:ButtonColumn in datagrid

Status
Not open for further replies.

IndyGill

Technical User
Jan 15, 2001
191
GB
Hi

I have a datgrid which has a Button Column as below

<Columns>
<asp:ButtonColumn DataTextField="SvpsName"
CommandName="Select">
</asp:ButtonColumn>
</Columns>

I would like to display the DataTextField of the selected item in a label on my page when I call my selectedIndexChanged sub. But im having trouble calling the button column item. I tried the following

CType(e.Item.Cells(0).Controls(1), Button).Text

e.Item.Cells(0).Text

I just cant seem to get it right... any ideas?

Thanks in advance
 
Indy, have you seen:

thread855-718103

seemed like a good thread w.r.t. your issue...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top