Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Closed Thread
Datagrid with button column
Old 03-08-2006, 04:35 PM Datagrid with button column
WebcyteDesign's Avatar
Registered User

Posts: 159
Location: Hamilton
Trades: 0
I have a datagrid with a button colum that when pressed displays to more buttons. Example of what I'm talking about at http://aspnet.4guysfromrolla.com/articles/071002-1.aspx

I've got everything to work but I want to put a javascript onclick event on the canel button.
I've tried to do it this way under the ItemDataBound event after I check to see if e.Item.Cells(0).Controls(0).Text is Edit but I get an error.

Dim deleteButton as Button = e.Item.Cells(0).Controls(1)
deleteButton.Attributes("onclick") = "javascript:return confirm('Delete this date?')"

So, I guess my question is, if you have multiple buttons in a buttonColumn how do you reference the second button?
WebcyteDesign is offline
View Public Profile Visit WebcyteDesign's homepage!
 
 
Register now for full access!
Old 03-08-2006, 04:44 PM Re: Datagrid with button column
WebcyteDesign's Avatar
Registered User

Posts: 159
Location: Hamilton
Trades: 0
Figured it out.
WebcyteDesign is offline
View Public Profile Visit WebcyteDesign's homepage!
 
Closed Thread     « Reply to Datagrid with button column
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09828 seconds with 12 queries