datagridview - Please give me an idea how to hide textboxes along grid in asp.net 4.0 -


i got requirement taking input user through text box fill grid whenever dropdown list item "custom" selected. textboxes "fromdate" "todate" need appear on screen whenever user selects "custom" item dropdownlist. please give me idea how hide these textboxes along grid in asp.net 4.0(visual studio 2010)

and why don't it, have idea...

html:

<asp:panel id="pnl" runat="server" visible="false">     <p>your textboxes below...</p> </asp:panel>  <asp:dropdownlist id="ddl" runat="server" autopostback="true"          onselectedindexchanged="ddl_selectedindexchanged">     <asp:listitem value="0" text="--select--"></asp:listitem>     <asp:listitem value="1" text="custom"></asp:listitem> </asp:dropdownlist> 

code behind:

protected void ddl_selectedindexchanged(object sender, eventargs e) {     if (ddl.selecteditem.text.equals("custom"))         pnl.visible = true;     else         pnl.visible = false; } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -