Hello,
I developed my project in Visual Studio 2013 and my project have a RadGrid with DetailTables inside to able to expand row details. Then I follow demo sample
to add a RadWindow for Edit and Add New Record.
All working fine until I added a RadGrid1_ItemCreated code behind to create dynamic URL for Edit link button
I could not expand row details anymore. I get an error in Chrome browser console:
As soon as I took OnItemCreated="RadGrid1_ItemCreated", the expand row works again
Can anyone please look at it? I don't know if this issue cause by Visual Studio 2013
Thanks,
Sam
I developed my project in Visual Studio 2013 and my project have a RadGrid with DetailTables inside to able to expand row details. Then I follow demo sample
to add a RadWindow for Edit and Add New Record.
All working fine until I added a RadGrid1_ItemCreated code behind to create dynamic URL for Edit link button
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
editLink.Attributes["href"] = "javascript:void(0);";
editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}','{2}','{3}');",
e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EmpID"],
e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["RowID"],
e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["VoucherID"],
e.Item.ItemIndex);
}
}
I could not expand row details anymore. I get an error in Chrome browser console:
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object. Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:6
Error.create Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:6
Sys.WebForms.PageRequestManager._createPageRequestManagerServerError Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:15
Sys.WebForms.PageRequestManager._parseDelta Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:15
Sys.WebForms.PageRequestManager._onFormSubmitCompleted Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:15
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:6
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:6
Sys.Net.WebRequest.completed Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:6
_onReadyStateChange Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSys…:6
As soon as I took OnItemCreated="RadGrid1_ItemCreated", the expand row works again
Can anyone please look at it? I don't know if this issue cause by Visual Studio 2013
Thanks,
Sam