This is a migrated thread and some comments may be shown as answers.

Problem w/ Telerik Controls Visibility

1 Answer 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 28 Oct 2008, 06:02 PM
I am having problems when I put a telerik control inside a <asp:panel visible="false"> on page load, then I set it to visible="true".  The telerik controls fail to work when they are invisible on page_load.  RadGrid for instance.  When I have the filter columns on, you type your criteria in and click the filter icon and nothing happens.  This also happens with RadTextbox.  The "EmptyMessage" does not disappear when you click inside the RadTextbox.

ex:

<asp:panel visible="false">
     <telerik:radeditor />
</asp:panel>

<asp:button> <!-- sets panel "visible=true" -->

The radeditor will display but the filters or any of the client events will not work.  I get a javascript error:

Error: $find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_rgFamilies") is null
Source File: http://localhost:1337/blah.aspx
Line: 1

If the grid is visible on page_load, everything works as expected.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Oct 2008, 06:05 AM
Hi Justin,

I tried this on my end and the Grid is working as expected. Here is the code I tried.

ASPX:
 <asp:Panel ID="Panel2" runat="server" Visible="false" > 
                <telerik:RadGrid ID="RadGrid2" Visible="false" AllowFilteringByColumn="true"  AutoGenerateColumns="true" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
                    <MasterTableView DataSourceID="SqlDataSource1"
                    </MasterTableView> 
                </telerik:RadGrid> 
                <telerik:RadTextBox ID="RadTextBox1"  EmptyMessage="Click here" runat="server"
                </telerik:RadTextBox> 
            </asp:Panel> 
           

<asp:Button ID="Button1" runat="server"    OnClick="Button1_Click" Text="Button" /> 


CS:
  protected void Button1_Click(object sender, EventArgs e) 
    { 
        Panel2.Visible = true
        RadGrid2.Visible = true
    } 


Thanks
Shinu.
Tags
General Discussions
Asked by
Justin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or