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

[Solved] javascript error

2 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
taeho
Top achievements
Rank 1
taeho asked on 22 Apr 2008, 07:13 AM
I followed
http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/SelectedValue/DefaultCS.aspx

All works fine except the following javascript error.

Line 351
Error message : 'srcElement' is null or not an object

this is generated in this line.
RadGrid1.ResponseScripts.Add(String.Format("window['{0}'].AjaxRequest('{1}', '');", RadGrid2.ClientID, RadGrid2.UniqueID));

in RadGrid1_PreRender event.

I know that as when I remove that line the javascript error doesn't occur.

Thank you in advance...

2 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 22 Apr 2008, 07:34 AM
Hi taeho,

Does the demo itself throw the JS error on your side or does the problem occur in your implementation only? The script may cause an error if you have not enabled the Grid built-in AJAX mode (EnableAJAX="true").

If you try that with the ASP.NET AJAX RadControls, you should use the ResponseScripts collection of RadAjaxManager. The Grid no longer includes built-in AJAX mode.

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
taeho
Top achievements
Rank 1
answered on 22 Apr 2008, 07:42 AM
Thank you for your reply.
the error occurs only for my implementation.
I use radGrid and their enablAjax are all set to true.

The error occurs but it works fine :(

Tags
Grid
Asked by
taeho
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
taeho
Top achievements
Rank 1
Share this question
or