Ok, I believe the panel is located inside a grid (grdContratos), and
perhaps a separate instance per row. For that you probably would have
to bind the client id dynamically in RowDataBound event.
Like replace hideIt('<%= pnlRejeitar.ClientID %>'); with <asp:Literal
runat="server" id="ltlJSCallProxy" />
Then in RowDataBound event find both this literal and panel by
ltlJSCallProxy = e.Row.FindControl("ltlJSCallProxy") as Literal,,,
and,,, pnlRejeitar = e.Row.FindControl("pnlRejeitar") as Panel.
Once ensuring you have found both in the row (also ensure RowType is
DataRow), set,,, ltlJSCallProxy.Text = string.Format("hideIt('{0});",
pnlRejeitar.ClientID);
Paulo - 04 Sep 2007 12:51 GMT
Thanks Muhammad for your help, you are right, the panel is inside the
template field on the gridview, but what is a literal?
How can I hide the panel? I didnt understand your example below! Can you
explaing in details? Im using VS 2005 asp.net 2.0...
Thanks a lot...
> Ok, I believe the panel is located inside a grid (grdContratos), and
> perhaps a separate instance per row. For that you probably would have
[quoted text clipped - 10 lines]
> DataRow), set,,, ltlJSCallProxy.Text = string.Format("hideIt('{0});",
> pnlRejeitar.ClientID);