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

Javascript error with new RadGrid

5 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 27 Nov 2008, 09:50 PM
Hi. I wonder if anyone can help.

We have an issue with v 2008.2.826.20 onwards of RadGrid (the issue does not exist with RadGrid.net2 v5.1.2.0).

We have a dashboard page containing web parts, and have implemented drag and drop to allow the web parts to be moved around. The trouble is as soon as we put a rad grid into one of these web parts we get a javascript error thrown in the Telerik javascript as soon as you try to drag any web part (not just the one with the grid). Remove the web part with the rad grid and all works fine. Also, the problem only exists if the grid has data in it - if there is no data in the grid everything works fine.

The error is appearing in the following Telerik script:

Telerik.Web.UI.Grid.IsChildOf=function(_3c,_3d){
while(_3c.parentNode){
if(_3c.parentNode==_3d){
return true;
}
_3c=_3c.parentNode;
}
return false;
};

The problem is that _3c is null, so it crashes as it is trying to access _3c.parentNode.

I guess the simple fix from Telerik would be to check if _3c is null, but I wonder if there is either an underlying problem with this caused by our drag and drop javascript code, or if this is a Telerik problem. Unfortunately it would be very difficult for me to supply a working example of our code so i'm hopeful that someone can make an educated guess!

Any advice appreciated.....

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 28 Nov 2008, 08:54 AM
Hello William,

It's very hard to find out the reason for the error you faced just by looking at this script. I don't think it's feasible to modify the code if we don't know the cause of the problem.

I suggest you either test the latest version of RadControls for ASP.NET AJAX or isolate the issue in a simple working project. In this way we will be able to examine and debug the code locally, and provide more to-the-point answer.

Updating RadControls for ASP.NET to another version or license

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
William
Top achievements
Rank 1
answered on 01 Dec 2008, 02:55 AM
Hi. Thanks for the reply.

I knew it would be difficult for you to track this down without a good way to repro it. Unfortunately i'm in between you and another team (who wrote the drag and drop code) so I don't actually have much control or access over this code. The other team have drawn a blank on this as well so I am basically at a dead end there.

I have tried with the latest version of telerik and the problem is still there (in the same place).

Is there any way I can modify your Js just so that I can see if I can run with it in that condition? If so, where can I get hold of it to change it.

Thanks
0
Daniel
Telerik team
answered on 03 Dec 2008, 04:46 PM
Hello William,

I notified our developers about your request. I will keep you informed on the subject.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Accepted
Daniel
Telerik team
answered on 04 Dec 2008, 12:44 PM
Hello William,

You can find the latest unofficial build attached to this thread. Please test it locally and let me know whether the problem persists.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
William
Top achievements
Rank 1
answered on 05 Dec 2008, 01:23 AM
Hi Daniel

That has fixed the problem - thanks very much.
Will keep an eye out for the next official release.

Cheers
Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
Daniel
Telerik team
William
Top achievements
Rank 1
Share this question
or