Click to See Complete Forum and Search --> : Linkbutton inside template column


VChellam1972
August 17th, 2004, 11:55 AM
If i have a template column in my datagrid, i add a button in item template. HOw can write to code to map the click event in button inside the template column.
can anyone help me how to map that event to the function?

MRutledge
August 20th, 2004, 11:26 AM
in the ondatabound event you can find this linkbutton control and then add an event just like you would in the oninit event.

i.e.

LinkButton lb = (LinkButton)FindControl("btnTemplate");
lb.Click += new System.EventHandler(this.lbEvent_Click);