Reply
Datagrid with button column
Old 03-08-2006, 03:35 PM Datagrid with button column
WebcyteDesign's Avatar
Extreme Talker

Posts: 159
Location: Hamilton
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
Reply With Quote
View Public Profile Visit WebcyteDesign's homepage!
 
When You Register, These Ads Go Away!
     
Old 03-08-2006, 03:44 PM Re: Datagrid with button column
WebcyteDesign's Avatar
Extreme Talker

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

Thread Tools

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

vB 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.11494 seconds with 13 queries