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

$find("<%= gridResults.ClientID %>").get_masterTableView() is coming back null

1 Answer 135 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Boone asked on 10 Aug 2010, 10:24 PM
I am trying to follow and do something similar. Although when I try to access the MasterTableView it comes back as null. What am I missing???

<head runat="server">
     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript">
           function pageLoad(sender, args) {
           function updateGrid(result) {
               var tableView = $find("<%= gridResults.ClientID %>").get_masterTableView();
    <form runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server" EnablePageMethods="true">
                <asp:ServiceReference  Path="SearchServices.svc" />
        <telerik:RadGrid ID="gridResults" runat="server">
                    <telerik:GridBoundColumn HeaderText="ID" DataField="ID" />
                    <telerik:GridBoundColumn HeaderText="City" DataField="OriginCity" />
                    <telerik:GridBoundColumn HeaderText="State" DataField="OriginState" />

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 11 Aug 2010, 07:11 AM
Hi Boone,

When binding the Grid manually on the client you need to attach a handler to its OnCommand client event. This is explained in this help article. To solve the problem you need to simply add the following:
<telerik:RadGrid ID="gridResults" runat="server">
        <ClientEvents OnCommand="function(){}"/>

Sincerely yours,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 2
Answers by
Telerik team
Share this question