user2496448
user2496448

Reputation: 115

Not able to hide Table row/message in code behind using c#

On Combo box selection change event i set the visible property of table and row to hide the message. But its not working.

Here is my code :

   <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
        <telerik:RadPageView ID="RadPageViewCaregiver" runat="server">
            <div class="container">
                <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose"
                    Width="200px" Height="250px" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
                    Position="MiddleLeft" ManualClose="True" ShowEvent="OnClick">
                </telerik:RadToolTipManager>
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
                    <tr>
                        <td align="center" valign="top" style="width: 100%">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr height="30px" valign="top" id="trmessage" runat="server" visible="false">
                                    <td valign="middle" align="center">
                                        <table border="0" cellpadding="0" cellspacing="0" width="98%" id="tbluser" runat="server"
                                            visible="False">
                                            <tr id="Tr1" runat="server">
                                                <td id="Td1" align="left" runat="server">
                                                    &nbsp;
                                                    <asp:Label ID="lblmessage" runat="server"></asp:Label>

                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>

I also tried to set the style for display to 'none' instead of visible to 'false' but it doesn't work either.

Can you give Any solution??

Upvotes: 0

Views: 4568

Answers (1)

Robin Joseph
Robin Joseph

Reputation: 1325

try display property to hide table. try this set of code.

tblAssignPatientMessage.Style.Add("display","none");

if the table style is set to be none then the tr style will also set to be hidden. if that doesn't work try this

trAssignPatientParentRow.Style.Add("display","none");

use this set of code to make the table visible.

tblAssignPatientMessage.Style.Add("display","block");

and for tr add this.

trAssignPatientParentRow.Style.Add("display","block");

and make sure that your table is not using any cssclass.

Upvotes: 1

Related Questions