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

javascript not running in insert item template

3 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 08 Jun 2012, 03:53 PM
Hi!

I am trying to do some javascript work in my RadGrid insert item template, but it won't even do an alert for me.  No error on my Chrome console or anything, just when I click "insert item" and it loads up the edit template, none of the javascript runs.  

Help!

 -Brett

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 12 Jun 2012, 02:50 PM
Hi Brett,

I have created a sample RadGrid web site where I implemented the described scenario. Please find the attached project and try to pinpoint the crucial differences between our projects since on my side everything works as expected.

I hope this helps. I could suggest you to thoroughly check your script declaration.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Brett
Top achievements
Rank 1
answered on 12 Jun 2012, 03:06 PM
Hey Eyup, from what I can see from your project you've put the javascript on the page that contains the grid, and aren't actually using a template file for your insert / editing, so this isn't the same scenario at all.  Your EditFormSettings should look like this:

  <EditFormSettings UserControlName="~/EditInsertItemTemplate.ascx" />

To recreate the scenario I'm describing you would need to have the previous line, and with the javascript being in the EditInsertItemTemplate.ascx file.
0
Eyup
Telerik team
answered on 14 Jun 2012, 01:53 PM
Hi Brett,

I have modified the project from my previous post to reproduce the described problem but to no avail. Please check out the attached web site and ensure that everything works as expected.

I could recommend you to temporarily disable any other scripting ( or ajaxifying if present ) and see if the problem still persists.

In addition, you could look to the following demo which resembles your scenario, but without the javascript:
 Grid / User Control Edit Form

Nevertheless, if the issue still remains, please open a support ticket and send us a runnable sample application demonstrating the problematic behavior. Thus, we will be able to further analyze the project and provide a proper solution.

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Brett
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Brett
Top achievements
Rank 1
Share this question
or