
I'm probably missing something obvious, but here is my code:
There is data in the result object.
function updateGrid(result) |
{ |
var gridObject = $find("<%=AGPermissions.ClientID %>"); |
var tableView = gridObject.get_masterTableView(); |
tableView.set_dataSource(result); |
tableView.dataBind(); |
} |
This thread indicated that an empty OnCommand event function would fix this issue, but it did not.
<telerik:RadGrid ID="AGPermissions" EnableViewState="false" Skin="Sunset" runat="server" |
AllowPaging="true" AllowSorting="True" AllowFilteringByColumn="true" GridLines="None"> |
<ItemStyle Wrap="false" /> |
<MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed"> |
<Columns> |
<telerik:GridBoundColumn DataField="AssetGroupID" HeaderText="Asset Group ID" /> |
<telerik:GridBoundColumn DataField="MembershipID" HeaderText="Asset Group ID" /> |
<telerik:GridBoundColumn DataField="AssetGroupName" HeaderText="Asset Group Name" /> |
<telerik:GridBoundColumn DataField="AssetGroupPermissionTypeID" HeaderText="Asset Group Permission Type" /> |
<telerik:GridBoundColumn DataField="AssetGroupPermissionType" HeaderText="Asset Group Permission Type" /> |
</Columns> |
</MasterTableView> |
<PagerStyle AlwaysVisible="true" /> |
<ClientSettings> |
<ClientEvents OnCommand="function(){}" /> |
</ClientSettings> |
</telerik:RadGrid> |
I attached to IE and this is what the error looks like: http://37web.com/radgriderror.jpg
Misc:
(*) I have an asp:ScriptManager with EnablePageMethods="true" in my MasterPage.
(*) I have cleared out IE's cache, deleted my Temporary ASP.NET Files, and recompiled, all to no effect.
(*) I'm using Visual Studio 2008, IE 7, and Windows XP.
Any help you could provide a new customer would be greatly appreciated.
Thanks!
17 Answers, 1 is accepted
I tried to reproduce the mentioned error but unfortunately without avail. Please download the attached website (based on the code you shared) and let us know how to modify it in order to recreate this behavior.
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

I attached to IE and stepped through the code, and the one difference I saw was that the code called by $find was different.
My original code:
- var tableView = gridObject.get_masterTableView();
- return $find(this._masterClientID);
- function Sys$_Application$findComponent(id,parent){}
The code you gave me:
- Same as above.
- Same as above.
- findComponent:function(b,a){return a?Sys.IContainer.isInstanceOfType(a)?a.findComponent(b):a[b]||null:Sys.Application._components[b]||null}

It's the Q2 2008 install and the version of the Telerik.Web.UI.dll is 2008.2.708.20.
Hope this helps.
Please note that the mentioned issue was fixed since Q2 2008 (version number 2008.2.723).
I recommend you examine our release history for more information.
Release History Q2 2008
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.


If you are binding RadGrid manually on the client, you should handle OnCommand event, otherwise you won't have a client-side object. Therefore when you try to access the master table view you receive an error message.
Please visit the following link for more information:
Client-side binding
"If you are using declarative data-binding and do not bind RadGrid on the server, it will manage to create its client object properly. However, if you are manually binding it on client and do not bind it on server, you need to attach a handler to its OnCommand client event."
To avoid the flickering you could use the following approach:
C#
protected void AGPermissions_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
e.Item.Display = false; |
} |
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I am trying to Load RadGrid on a button click event client side(using JSON webservice approch )
I am sepcifying Clientsettings-->DataBinding.Location and Clientsettings-->DataBinding.SelectMethod using javascript which will get invoked on Button client click event.
function testit() {
var ctrl = $find('<%=clientRadGrid.ClientID%>');
ctrl.ClientSettings.DataBinding.Location = "searchservice.asmx";
ctrl.ClientSettings.DataBinding.SelectMethod = "GetData";
var tableView = $find("<%= clientRadGrid.ClientID %>").get_masterTableView();
tableView.rebind();
}
Data is not getting dispalyed in my Grid.Kindly Guide me ....
My full code is as follow
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGridClientside.aspx.cs" Inherits="TelerikWorkouts.RadGridClientside" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function testit() {
debugger;
var ctrl = $find('<%=clientRadGrid.ClientID%>');
ctrl.ClientSettings.DataBinding.Location = "searchservice.asmx";
ctrl.ClientSettings.DataBinding.SelectMethod = "GetData";
var tableView = $find("<%= clientRadGrid.ClientID %>").get_masterTableView();
tableView.rebind();
}
</
script
>
</
telerik:RadCodeBlock
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
runat
=
"server"
></
asp:ScriptManager
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"clientRadGrid"
AutoGenerateColumns
=
"false"
EnableAJAX
=
"True"
>
<
MasterTableView
runat
=
"server"
AllowPaging
=
"true"
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"false"
AllowSorting
=
"false"
DataField
=
"Name"
DataType
=
"System.String"
HeaderText
=
"Name"
Visible
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
AllowFiltering
=
"false"
AllowSorting
=
"false"
DataField
=
"Age"
DataType
=
"System.Int32"
HeaderText
=
"Age"
Visible
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"function(){}"
/>
<%--<
DataBinding
SelectMethod
=
"GetData"
Location
=
"searchservice.asmx"
></
DataBinding
>--%>
</
ClientSettings
>
</
telerik:RadGrid
>
<
asp:Button
runat
=
"server"
Text
=
"show"
OnClientClick
=
"testit();"
/>
</
form
>
</
body
>
</
html
>
Please try to set the location property declaratively and let me know whether this helps.
Regards,
Daniel
the Telerik team

function EndRequestHandler(sender, args) { if ( postBackElement != null ) { // Get The Current Reservation Wizard Step var intWizStep = parseInt($get('wStep').value); // Get The Reservations Grid - Selected Request var masterGrid = null; // Get The MasterTable Of The Reservations Grid - Selected Request var masterTable = null; // Get The Number Of Data Items In The Grid var dataItems = null; // Get The DataKey Of The First Item In The MasterTable Of The Reservations Grid - Selected Request var firstDataItem = null; // Find Our Reservations Timer Message Container var requestMessage = null; // Get The Time Remaining For The Reservations Timer Message Container var secondsRemaining = 0; switch (true) {case (postBackElement.indexOf("ChoicesTimer") > 0) : case (postBackElement.indexOf("DoNotMoveCheckBox") > 0) : // Get The MasterTable Of The Reservations Grid - Selected Request
// CODE BLOWS UP HERE ---->masterTable = $find('<%= ReservationsGridA.ClientID %>').get_masterTableView(); // Get The DataKey Of The First Item In The MasterTable Of The Reservations Grid - Selected Request firstDataItem = masterTable.get_dataItems()[0].getDataKeyValue("ID"); // Find Our Reservations Timer Message Container requestMessage = $get('<%= RequestMessageSelections.ClientID %>'); // Get The Time Remaining For The Reservations Timer Message Container secondsRemaining = GetCurrentTime("CountDownPanel1"); // If There Are Items In The MasterTable Of The Reservations Grid - Selected Request if (firstDataItem != null && firstDataItem != 0) { // Show Reservations Timer Message Container requestMessage.className = "requestMessage"; // Continue The Reservations Checkout Timer ActivateCountDown("CountDownPanel1", secondsRemaining, null); } if (secondsRemaining <= 0) { // Show Reservations Timer Message Container requestMessage.className = "requestMessageHide"; // Stop The Reservations Checkout Timer DeactivateCountDown("CountDownPanel1"); } break;Please do not request the project because that is impossible. I have rolled my project
back to version 2011.1.315 and currently have no plans on moving to 2011.2.712. Needless
to say I am very disappointed with this development.

I will do my best to recreate this problem at my side but I need to know two things:
- .NET Framework version
- the name of the event (OnRequestEnd, OnGridDestroying, OnTableDestroying, etc) where the problem has occurred.
Thanks,
Daniel
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Thanks.
I tried to replicate this scenario but seems that I'm missing something because I didn't notice any problem.
Please find attached my sample project (bundled with assemblies).
Regards,
Daniel
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

I've tried RadScriptManager, ScriptManager and ToolkitScriptManager.
If you want me to look into this issue, please submit a simplified runnable project via the support ticket system.
Thanks,
Daniel
the Telerik team

Thanks for get back to me. Finally resolved this issue. It was an issue with the datagrid not being rebound eventhough rebind was explicitly being called.