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:
SHIFT 1
Dave
Mark
ENROLL
ENROLL
SHIFT 2
Joe
ENROLL
ENROLL
ENROLL
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,
Rob
|