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

Error when converted from 1.1 to ASP.NET Ajax

4 Answers 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 04 Nov 2008, 11:26 AM
Hi,

I have just converted my project to 3.5 and have changed the RAD Grid reference to use the ASP.NET AJAX controls.

My RAD Grid has a master table and a details table. Whenever I try to expand the Master table to view the details table, I get an error:

"this._tableView._owner._clientKeyValues' is null or not an object"

I tried adding the ClientDataKeyNames to both the MasterTable and the DetailsTable, but that hasnt helped.

Any help/pointers on this will be very much appreciated.

Thanks

Amit

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 04 Nov 2008, 11:55 AM
Hello Amit,

Please share your RadGrid declaration (together with any JavaScript used) in order to be examined.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Amit
Top achievements
Rank 1
answered on 04 Nov 2008, 12:00 PM
Hi,

The code is below:

Thanks for your help.

Amit

<%@ Register TagPrefix="radg" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<radg:radgrid id="RadPlanner" runat="server" CssClass="RadGrid_MatrixIms" AutoGenerateColumns="False" 
                    GridLines="None" AllowSorting="True" AllowPaging="False" Skin="MatrixIms"   
                    EnableEmbeddedSkins="False" Width="1003px">  
                    <FooterStyle CssClass="GridFooter_MatrixIms"></FooterStyle> 
                    <PagerStyle CssClass="GridPager_MatrixIms" Mode="NumericPages"></PagerStyle> 
                    <GroupHeaderItemStyle CssClass="GroupHeader_MatrixIms"></GroupHeaderItemStyle> 
                    <AlternatingItemStyle CssClass="GridAltRow_MatrixIms"></AlternatingItemStyle> 
                    <CommandItemStyle CssClass="GridCommandRow_MatrixIms"></CommandItemStyle> 
                    <SelectedItemStyle CssClass="SelectedRow_MatrixIms"></SelectedItemStyle> 
                    <HeaderStyle CssClass="GridHeader_MatrixIms"></HeaderStyle> 
                    <ActiveItemStyle CssClass="ActiveRow_MatrixIms"></ActiveItemStyle> 
                    <FilterItemStyle CssClass="GridFilterRow_MatrixIms"></FilterItemStyle> 
                    <MasterTableView DataKeyNames="ID" HierarchyLoadMode="Client" CssClass="MasterTable_MatrixIms" GridLines="None" 
                        AllowMultiColumnSorting="True" ClientDataKeyNames="ID">  
                        <ItemStyle CssClass="imsDataGridItems"></ItemStyle> 
                        <RowIndicatorColumn Visible="False" FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                            SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif">  
                            <ItemStyle CssClass="ResizeItem_MatrixIms"></ItemStyle> 
                            <HeaderStyle Width="20px" CssClass="ResizeHeader_MatrixIms"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <HeaderStyle CssClass="imsDataGridHeader"></HeaderStyle> 
                        <AlternatingItemStyle CssClass="imsDataGridItemsAlternative"></AlternatingItemStyle> 
                        <EditFormSettings> 
                            <EditColumn FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" UpdateImageUrl="~/RadControls/Grid/Skins/MatrixIms/Update.gif" 
                                InsertImageUrl="~/RadControls/Grid/Skins/MatrixIms/Insert.gif" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                EditImageUrl="~/RadControls/Grid/Skins/MatrixIms/Edit.gif" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" 
                                CancelImageUrl="~/RadControls/Grid/Skins/MatrixIms/Cancel.gif"></EditColumn> 
                        </EditFormSettings> 
                        <Columns> 
                            <radg:GridBoundColumn Visible="False" HeaderText="ID" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                DataField="ID" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" HeaderButtonType="TextButton" 
                                FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" UniqueName="ID" SortExpression="ID">  
                                <ItemStyle Width="30px"></ItemStyle> 
                            </radg:GridBoundColumn> 
</Columns> 
                        <DetailTables> 
                            <radg:GridTableView DataKeyNames="ScenarioID" HierarchyLoadMode="Client" AllowPaging="False" 
                                GridLines="Horizontal" Width="100%" ClientDataKeyNames="PortfolioPlannerID,ScenarioID">  
                                <ItemStyle CssClass="imsDataGridItems"></ItemStyle> 
                                <RowIndicatorColumn Visible="False" FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                    SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif">  
                                    <HeaderStyle Width="20px"></HeaderStyle> 
                                </RowIndicatorColumn> 
                                <ParentTableRelation> 
                                    <radg:GridRelationFields DetailKeyField="PortfolioPlannerID" MasterKeyField="ID"></radg:GridRelationFields> 
                                </ParentTableRelation> 
                                <HeaderStyle CssClass="imsDataGridHeader"></HeaderStyle> 
                                <AlternatingItemStyle CssClass="imsDataGridItemsAlternative"></AlternatingItemStyle> 
                                <EditFormSettings> 
                                    <EditColumn FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" UpdateImageUrl="~/RadControls/Grid/Skins/MatrixIms/Update.gif" 
                                        InsertImageUrl="~/RadControls/Grid/Skins/MatrixIms/Insert.gif" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                        EditImageUrl="~/RadControls/Grid/Skins/MatrixIms/Edit.gif" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" 
                                        CancelImageUrl="~/RadControls/Grid/Skins/MatrixIms/Cancel.gif"></EditColumn> 
                                </EditFormSettings> 
                                <Columns> 
                                    <radg:GridBoundColumn Visible="False" HeaderText="Portfolio PlannerID" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                        DataField="PortfolioPlannerID" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" HeaderButtonType="TextButton" 
                                        FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" UniqueName="PortfolioPlannerID" SortExpression="PortfolioPlannerID">  
                                        <ItemStyle Width="30px"></ItemStyle> 
                                    </radg:GridBoundColumn> 
                                    <radg:GridBoundColumn Visible="False" HeaderText="Scenario ID" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                        DataField="ScenarioID" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" HeaderButtonType="TextButton" 
                                        FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" UniqueName="ScenarioID" SortExpression="ScenarioID">  
                                        <ItemStyle Width="30px"></ItemStyle> 
                                    </radg:GridBoundColumn> 
</Columns> 
                                <CommandItemSettings AddNewRecordImageUrl="~/RadControls/Grid/Skins/MatrixIms/AddRecord.gif" RefreshImageUrl="~/RadControls/Grid/Skins/MatrixIms/Refresh.gif"></CommandItemSettings> 
                                <ExpandCollapseColumn Visible="False" FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                                    CollapseImageUrl="~/RadControls/Grid/Skins/MatrixIms/SingleMinus.gif" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" 
                                    ExpandImageUrl="~/RadControls/Grid/Skins/MatrixIms/SinglePlus.gif">  
                                    <HeaderStyle Width="19px"></HeaderStyle> 
                                </ExpandCollapseColumn> 
                            </radg:GridTableView> 
                        </DetailTables> 
                        <CommandItemSettings AddNewRecordImageUrl="~/RadControls/Grid/Skins/MatrixIms/AddRecord.gif" RefreshImageUrl="~/RadControls/Grid/Skins/MatrixIms/Refresh.gif"></CommandItemSettings> 
                        <ExpandCollapseColumn FilterImageUrl="~/RadControls/Grid/Skins/MatrixIms/Filter.gif" SortDescImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortDesc.gif" 
                            CollapseImageUrl="~/RadControls/Grid/Skins/MatrixIms/SingleMinus.gif" SortAscImageUrl="~/RadControls/Grid/Skins/MatrixIms/SortAsc.gif" 
                            ExpandImageUrl="~/RadControls/Grid/Skins/MatrixIms/SinglePlus.gif">  
                            <HeaderStyle Width="19px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                    </MasterTableView> 
                    <ClientSettings AllowExpandCollapse="True"></ClientSettings> 
                    <ItemStyle CssClass="GridRow_MatrixIms"></ItemStyle> 
                    <EditItemStyle CssClass="GridEditRow_MatrixIms"></EditItemStyle> 
                    <FilterMenu NotSelectedImageUrl="~/RadControls/Grid/Skins/MatrixIms/NotSelectedMenu.gif" SelectedImageUrl="~/RadControls/Grid/Skins/MatrixIms/SelectedMenu.gif">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </FilterMenu> 
                </radg:radgrid> 
0
Amit
Top achievements
Rank 1
answered on 04 Nov 2008, 12:14 PM
Sorry,

Forgot to say - there is no javascript used.

Amit
0
Daniel
Telerik team
answered on 05 Nov 2008, 05:37 PM
Hello Amit,

Thank you for the provided example.

I tried to reproduce your scenario using the aspx file you provided (without modifications). My example uses Northwind with the appropriate aliases adapted to fit your code.

Please test it locally and let us know whether you experience the same issues.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Amit
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Amit
Top achievements
Rank 1
Share this question
or