When double clicking a row in the grid I get a javaScript error saying "this._tableView._owner._clientKeyValues is null or not an object".
Any idea why this is and how I can prevent this from happening?
Many thanks,
Vincent.
10 Answers, 1 is accepted
Unfortunately we have not been contacted with such an error report before. Can you please post the Grid markup which row you click to get that?
Kind regards,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
![](/forums/images/avatarimages/default.gif)
Hi Konstantin,
The markup is as follows:
<telerik:RadGrid ID="rgLog" runat="server" AutoGenerateColumns="False" GridLines="None" OnItemDataBound="rgLog_ItemDataBound" OnNeedDataSource="rgLog_NeedDataSource" Width="100%" OnDetailTableDataBind="rgLog_DetailTableDataBind" Skin="Outlook" ShowHeader="False">
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
</MasterTableView>
</
telerik:RadGrid>
I doubt this is useful as we create all records dynamically using objects as data.
The grid has a two layer hierarchy and uses the NeedDataSource, ItemDataBound and DetailTableDataBind events to get the data to show.
Simply double clicking a top level row gives the error.
I hope this is of any help.
Regards,
Vincent.
Can you please try showing the headers and let us know if this helps? Do you get the error on the this demo having similar Grid configuration?
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/DetailTableDataBind/DefaultCS.aspx
If you still need our assistance, I think it will be best to send us a runnable project where the error is isolated as much as possible. This way we can debug the exact problem and get back with resolution faster.
Regards,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
![](/forums/images/avatarimages/default.gif)
Showing the header did not help. I tried the online example and nothing happened when I double clicked a row.
I don't have time to create a sample app now. If we do create a sample app I will probably email it to you or an email address you provided when we bought the component.
Thanks sofar,
Vincent.
You can also download the latest Q2 2008 version of ASP.NET AJAX suite release labeled 2008.2.723 and give it a go. You may find this KB article helpful.
Regards,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
![](/forums/images/avatarimages/default.gif)
Cheers,
Vincent.
Please send us a runnable demo where the problem is isolated when you have the time to create that. Thank you for your cooperation and understanding!
Regards,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
![](/forums/images/avatarimages/default.gif)
I have created a test application which works fine. I was wondering wether you would know something more with the following information:
Both our failing app and my test app are normal ASP apps (NOT Ajax enabled apps) so they use the RadScriptManager. The failing app is also using AjaxPro. The failing App is converted from the demo version to the Bought version (latest) but the test app is build with the new grid from scratch.
When debugging the error I see it occurs in this file: Telerik.Web.UI.WebResource.axd
The error occurs on the Bold and Italic line.
Telerik.Web.UI.GridDragDropCancelEventArgs.registerClass("Telerik.Web.UI.GridDragDropCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.GridDataItemEventArgs=function(_3fe,_3ff){
Telerik.Web.UI.GridDataItemEventArgs.initializeBase(this);
this._id="";
this._itemIndexHierarchical="";
this._gridDataItem=null;
this._tableView=null;
this._dataKeyValues=null;
if(_3fe){
this._id=_3fe.id;
this._itemIndexHierarchical=this._id.split("__")[1];
this._gridDataItem=$find(this._id);
this._tableView=$find(this._id.split("__")[0]);
if(this._tableView&&this._tableView._owner._clientKeyValues&&this._tableView._owner._clientKeyValues[this._itemIndexHierarchical]){
this._dataKeyValues=this._tableView._owner._clientKeyValues[this._itemIndexHierarchical];
}
}
this._domEvent=_3ff;
};
Aparantly this._tableView._owner is undefined and this._tableView._owner._clientKeyValues is null.
Could you maybe explain about the _owner? Is that something that should be set? Or the _clientKeyValues?
Obviously the event fires when double clicking. It's trying to set it to edit mode, which we don't need. What are the "requirements" to have the control enter edit mode? Any properties that need to be set?
Thanks for any hints you can provide,
Vinz.
![](/forums/images/avatarimages/default.gif)
Put "<xhtmlConformance mode="Legacy"/>" in the web.config's System.Web section and a double click will fail.
Google "xhtmlConformance " for more info. We now have to see if we can live without that line or setting it to "strict"...
Should this be supported by the Grid?
Thanks,
Vincent.
You can safely remove this line from your web.config as its purpose is to provide backwards compatibility with the ASP.NET 1.x framework. Here is some more info on this subject:
http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.