Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 30th, 2007, 10:38 PM
Friend of Wrox
Join Date: Jul 2006
Location: olathe, ks, USA.
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default Add LinkButton To Nested GridView Dynamcially

I have a personalized example of what I am trying to do in the Beginner thread, but beginning to wonder if this is a pro topic and so I'm wondering if someone could *please* describe to me how I would dynamically add rows to a GridView, where each row is a linkbutton that I put in and have it so that the linkbutton's click event is added. The GridView is nested in a DataList so that the Datalist shows "Events" and teh GridView shows "people" that are signed up for each event. What I am trying to do is have code that will add a row to the gridview showing "[u]ENROLL</u>" for extra shifts that are not filled...such that:



I get the linkbutton's added, but I can't get the click event to trigger. I know it all has to do with the timing of events, but the only event that I can add the rows is the RowDataBound event of the GridView. It's in there that I'm creating and adding the LinkButton---again, it isn't firing the click event though.

Thanks in advance,

  #2 (permalink)  
Old January 3rd, 2008, 10:19 AM
Authorized User
Join Date: Jan 2008
Location: london, , United Kingdom.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to pepperoni00

i am not sure bout this but i think u want to show link button"enroll" in one column ..not in row
i hope u added link button by selecting the tag located in the top right corner of the control..
then to handle that button,u gotta define an event by pressing event handler button in the top of the properties window..its looks something like "lightening" sign

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tie to nested GridView inside DataList rsearing ASP.NET 2.0 Basics 6 June 18th, 2011 06:35 AM
Nested Gridview Event Problem surendraparashar ASP.NET 2.0 Professional 0 November 16th, 2007 03:17 AM
Fire Events from Nested GridView adamh409 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 November 5th, 2007 01:18 PM
How to add a new column into gridview? Bryan Stanley ASP.NET 2.0 Basics 0 September 12th, 2007 10:49 PM
how to hide linkbutton in edit mode of a gridview hertendreef ASP.NET 2.0 Basics 0 July 31st, 2007 03:08 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.