Identify parent control from child control
-
Hi all, I have a gridview (say Agenda )which has several databound fields and a template field the template field has a linkbutton and a gridview (say AgendaItem). inner gridview (agendaItem)is poulated at the time of datarowbound event of outer gridview (Agenda) I want to delete AgendaItems from a row of Agenda by clicking the linkbutton. but how can I identify agendaItem gridview of respective row of agenda gridview. Remember that I am just clicking the Linkbutton of a row of Agenda gridview. ========= If I can identify the Agenda grid row by clicking the templated linkbutton then I can do the rest. thanks
-
Hi all, I have a gridview (say Agenda )which has several databound fields and a template field the template field has a linkbutton and a gridview (say AgendaItem). inner gridview (agendaItem)is poulated at the time of datarowbound event of outer gridview (Agenda) I want to delete AgendaItems from a row of Agenda by clicking the linkbutton. but how can I identify agendaItem gridview of respective row of agenda gridview. Remember that I am just clicking the Linkbutton of a row of Agenda gridview. ========= If I can identify the Agenda grid row by clicking the templated linkbutton then I can do the rest. thanks
hmm.. Since the agendaitem is populated at the time of datarowbound of Agenda, u can identify the row for inneragenda when the link button is clicked. U can then use the same relation as at the time of binding data to delete the data from the database and then rebind the two gridviews. I know this can be resource extensive if u have several clicks per user as per ur application . Can't think of anything else. Let's see other suggestions.