![]() |
| ||
| Handler attached to Button.Click inside Gridview not firing Hi, I have a Button inside of a GridView, inside of another GridView. The higher gv is filled with a dataset, and in the RowCreated event I fill the second gv, and finally, in the RowCreated event (handler added in the RowCreated event of the first gv) of the second gv, attach the handler of the Click event with the button inside. I have another controls in the same way with their own events added and works fine, but this Button dont... When I press the button, it postback but the event is like not been called (even when I debugged and the rowcreated reach the line with the addhandler for the button) Maybe some one can guide me through this... aspx <asp:Content ID="cVentanillaAtencionFlujo" ContentPlaceHolderID="cphVentanillaAtencionMaster" Runat="Server"> Code behind If e.Row.RowType = DataControlRowType.DataRow Then |
| ||
| Re: Handler attached to Button.Click inside Gridview not firing Try: buttonName.PostBackUrl="javascript:void(0);" |
| ||
| Re: Handler attached to Button.Click inside Gridview not firing Thanks... but I tried it, and It didn't worked. I just have to give up that idea, coz I'm on a schedule... Thank you very much... |
| ||
| Re: Handler attached to Button.Click inside Gridview not firing Just go to design view. Open the template column then add the event in design view. Set commandname when bind data. Now in the click event catch the command value & do the next job. The way you used is basically needed when you create dynamic control otherwise try to avoid unnecessary complexity. |
| All times are GMT -4. The time now is 10:29 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC