Hide a row
-
Is it possible to hide (visible=false) a complete row of controls with 1 command? And can this be controlled from code-behind? If so, pleasee show example... Thanks in advance... Chuck...
Yes, it is possible. Give the Row a id and make it runat="server" like
<table>
<tr id="rowhide" runat="server">
<td>
<asp:Label id="lbl" runat="server" Text="Test"></asp:Label>
</td>
<td>
<asp:Label id="lbl2" runat="server" Text="Tes2"></asp:Label>
</td>
</tr>
</table>And now at the code behind page you can do like rowhide.Visible = false; //true Hope it helps. Regards, Kaushal Arora
-
Is it possible to hide (visible=false) a complete row of controls with 1 command? And can this be controlled from code-behind? If so, pleasee show example... Thanks in advance... Chuck...
Hi MacIntyre, Please specify which control you are using now ??? Most of the controls support this visiblity feature. You can use Fetchrowstyle(),OnItemDataBound() methods, only when you are using grids. datarow.visible is also possible. or, place these controls in a panel, after that manage the visibility of the panel. If you are using server tables you can manage it from code behind. But it would be memory consuming. So, dont try to use server controls, if possible :)
Thanks & Regards, Jeneesh k. v.
-
Yes, it is possible. Give the Row a id and make it runat="server" like
<table>
<tr id="rowhide" runat="server">
<td>
<asp:Label id="lbl" runat="server" Text="Test"></asp:Label>
</td>
<td>
<asp:Label id="lbl2" runat="server" Text="Tes2"></asp:Label>
</td>
</tr>
</table>And now at the code behind page you can do like rowhide.Visible = false; //true Hope it helps. Regards, Kaushal Arora
-
Hi MacIntyre, Please specify which control you are using now ??? Most of the controls support this visiblity feature. You can use Fetchrowstyle(),OnItemDataBound() methods, only when you are using grids. datarow.visible is also possible. or, place these controls in a panel, after that manage the visibility of the panel. If you are using server tables you can manage it from code behind. But it would be memory consuming. So, dont try to use server controls, if possible :)
Thanks & Regards, Jeneesh k. v.
most of the rows are in a table and are things list dropdownlist, label and textbox. They are usually all within the same row or tr tags.. I actually want it to appear to non-managers as if there was never anything there, but to managers the row appears. Ex: To manager: Customer Name: John Doe Account Balance: $10.000 Account Standing: Excellant EX: to non-managers: Customer Name: John Doe Account Standing: Excellant So you see a non-manager would never know that the "Account Balance" row ever existed. If you have additional thoughts I would appreciate hearing them. CHeers.. Chuck...