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

Rad Tab strip | Java script error

1 Answer 54 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Alok asked on 21 Jun 2010, 02:42 PM
I am using the RadGrid control in my project. Here I am loading this control dynamically in a RadTab control and trying to access the master table view of the grid control .

  var   tableView = $find("<%= grdAllDocs.ClientID %>").get_masterTableView();

but it is throwing the following exception.

Error Msg: null is null or not an object.

I am creating the grid control as follows:-

<telerik:RadGrid ID="grdAllDocs" runat="server" EnableViewState="True" AutoGenerateColumns="false"           
            AllowSorting="true" PageSize="25" OnItemCreated="grdAllDocs_ItemCreated"
            OnColumnCreated="grdAllDocs_ColumnCreated" OnItemDataBound="grdAllDocs_ItemDataBound"
            OnColumnCreating="grdAllDocs_ColumnCreating" AllowPaging="True" EnableEmbeddedSkins="false"
            <itemstyle wrap="false" />
            <mastertableview allowfilteringbycolumn="True" tablelayout="Fixed">
                        <PagerStyle PageButtonCount="3" Mode="NumericPages" HorizontalAlign="Right" AlwaysVisible="true"    EnableSEOPaging="false" Position="TopAndBottom" ShowPagerText="true"></PagerStyle>

Please suggest me how I can get the master table view of the grid on the client side.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 24 Jun 2010, 09:43 AM
Hi Alok,

The Javascript error means that at the time you are executing

$find("<%= grdAllDocs.ClientID %>")

the grdAllDocs control does not exist on the page (is not rendered), or that its client object has not been initialized yet. The first option can be caused by the fact that you are only loading one RadPageView instead of all of them (RenderSelectedPageOnly property of the RadMultiPage). The second option can be caused by the fact that you are executing $find too early.

If you need further assistance, please send a runnable demo, so that we can test it locally.

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 1
Answers by
Telerik team
Share this question