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

[Solved] Programatically Created Grid (on Page_Init) with Drag n Drop

3 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Toby
Top achievements
Rank 1
Toby asked on 03 Sep 2009, 09:30 AM
Hi,

I have  a grid created on the Page_Init method and the grid is populated client side from a webservice when I try and used drag n drop i get an exception on the server

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'.
   at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.organisationalviews2_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8c660e17\2b7f802b\App_Web_nrp1nnrc.16.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

the drag n drop was working fine, but it seems to have broken since I converted the grid to be created at run time. I have also completed disconnected the clientside row dropping event and serverside RowDrop event but i still get this exception.

any ideas?.

3 Answers, 1 is accepted

Sort by
0
Toby
Top achievements
Rank 1
answered on 03 Sep 2009, 09:36 AM
i should add I only know about this exception because I am trapping

void Application_Error(object sender, EventArgs e) in Global.asax - otherwise it does not seem to fire.
0
Nikolay Rusev
Telerik team
answered on 08 Sep 2009, 07:00 AM
Hello Toby,

I am afraid that I cannot determine what is causing described behavior from the information provided so far. Can you post your code?

All the best,
Nikolay
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.
0
Toby
Top achievements
Rank 1
answered on 08 Sep 2009, 08:25 AM
Hi,

I already have a another support request open with a copy of my application so I will deal with this issue there - I wil post the results here for other users...
Tags
Grid
Asked by
Toby
Top achievements
Rank 1
Answers by
Toby
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or