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

$find RadGrid is null in user control

0 Answers 83 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Peter asked on 08 Jun 2012, 02:54 AM
I have a user control (ascx) with a radgrid. The user control is placed in a container control and that is placed in update panel.
I always get 
$find("ctl00_phMain_FS_TreeClients_ClientsList1_RadGrid1") is null

I've tried to move the container out of the update panel but the result is the same.
here is my user control code

    <script type="text/javascript">
        function RefreshClientGrid() {
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
<asp:Label ID="CompanyIdLabel" runat="server" Visible="False"></asp:Label>
<uc1:FSCompanyReadOnly ID="FSCompanyReadOnly1" runat="server" />
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" DataSourceID="LinqDataSource1"
    GridLines="None" Skin="Telerik"
    PageSize="15" CellSpacing="0" OnItemCommand="RadGrid1_ItemCommand"
    AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
    <MasterTableView DataKeyNames="ClientId" CommandItemDisplay="Top" ClientDataKeyNames="ClientId">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <HeaderStyle Width="20px"></HeaderStyle>
            <HeaderStyle Width="20px"></HeaderStyle>
            <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn">
                <ItemStyle CssClass="GridImageButton" />
            <telerik:GridBoundColumn DataField="ClientId" DataType="System.Int32" HeaderText="ClientId"

Help please

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question