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
Post a Comment