hi,
we have an ASP.NET website.
Within here a user control.
THis user control contains two RADGRID controls.
Grid 1 is populated with data. Grid 2 is empty.
We are trying to drag a row from Grid 1 to Grid 2.
We have this working in another web page, but it seems that within a user control there are complications. When we perform the drag/drop we get this error:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 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.ProcessRequest(HttpContext context) at ASP.review_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\mppr4\4fbd45b7\6039e974\App_Web_r6ddz0kb.20.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The AJAX manager and settings are set up in the web page that is hosting the user control.
Here is the client script:
function onRowDropping(sender, args) {
debugger;
if (sender.get_id() == "<%=rgArticles.ClientID %>") {
var node = args.get_destinationHtmlElement();
if (!isChildOf('<%=RadGrid1.ClientID %>', node) && !isChildOf('<%=rgArticles.ClientID %>', node)) {
args.set_cancel(true);
}
}
}
function isChildOf(parentId, element) {
while (element) {
if (element.id && element.id.indexOf(parentId) > -1) {
return true;
}
element = element.parentNode;
}
return false;
}
What is happening is the code behind rowdropping method is not firing, instead we get the error above.
Does anyone have ideas why this wouldn't be working in a user control ?
Vanaja