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

UserControl and Ajax

6 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christoph
Top achievements
Rank 1
Christoph asked on 03 Dec 2008, 01:38 PM
Hello!

I have a radgrid, which has a user control as edit form. On the grid page i have a radajaxmanager.
In the user control i would like to use javascript functions (button->onclientclick). Therefor i have a radscriptblock.
The javascript in the user control causes an error because of the radajaxmanager (The javascript function has only an alert for testing). If i remove the radajaxmanager, everything works fine.
If searched a lot in the forum and testet  a view things without success.
Please can someone help me out of this problem?
Thank you!

6 Answers, 1 is accepted

Sort by
0
Christoph
Top achievements
Rank 1
answered on 03 Dec 2008, 02:12 PM
No ideas?
0
Maria Ilieva
Telerik team
answered on 04 Dec 2008, 09:06 AM
Hi Christoph,

Could you please let us know what is the exact error you are facing in this scenario? Also, could you please test the application by using regular asp UpdatePanel instead of RadAjax and let me know if the error still persists?

Best wishes,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christoph
Top achievements
Rank 1
answered on 05 Dec 2008, 01:04 PM

Thank you!

ScriptManager.RegisterStartupScript does the trick for me.
I don't know why normal javascript does not work! I also don't know the error, because after clicking on the button the javascript error will be deleted because of Ajax Request.
Anyway this is only one problem i have with the grid, so i will look for the other problems first...

0
Christoph
Top achievements
Rank 1
answered on 07 Dec 2008, 05:14 PM
So now i need to have javascript in a usercontrol!
It's frustrating - i need to have an Ajaxed Grid with a usercontrol. I don't think that is something special.

If i put javascript code in the usercontrol, i'm getting 'undefined' errors. The functions can not be found. It looks like the javascript code is ignored, when Ajax is enabled. I'm using the find-method - therefore it is not possible to put that javascript code into the page, which loads the usercontrol.
Where can i put my javascript code????
0
Maria Ilieva
Telerik team
answered on 08 Dec 2008, 01:24 PM
Hello Christoph,

Please review the following help topics which elaborate on using RadAjax in UserControl and executing javascript after AjaxRequest:

RadAjax and WebUserControls
Executing custom javascript code after AJAX update



Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Travis
Top achievements
Rank 1
answered on 15 Feb 2011, 10:42 PM
Thanks, this was helpful for me!
Tags
Grid
Asked by
Christoph
Top achievements
Rank 1
Answers by
Christoph
Top achievements
Rank 1
Maria Ilieva
Telerik team
Travis
Top achievements
Rank 1
Share this question
or