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

Adding a New LiteralControl to hidden ajax radgrid

2 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nitesh monga
Top achievements
Rank 1
nitesh monga asked on 05 Jan 2009, 05:56 PM
hi there. i am facing a problem while adding LiteralControl to hidden ajax radgrid, i have ajax enable radgrid which is hidden by using a CSS with, the older radgrid version (.net 1.x ) its was working fine, i am not able to get it worked with the new ajax control below is the details of the problem.

when a user click on a submit button there are some checks which are performed, in that process if there is any problem the code returns the error text and then that text is attached to the hidden radgrid using the code below

RadGrid2.Controls.Add(
New LiteralControl("<script language='JavaScript'>alert('invalid date.');</script>"))

 

 

the above code was working fine with the old versions but with the new controls this error message is never  shown.

thanks
nitesh monga


 

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 06 Jan 2009, 07:43 AM
Hi nitesh,

In ASP.NET AJAX you can register scripts only using ScriptManager. In extended this and you can use RadAjaxManager (or RadAjaxPanel) ResponseScripts property to add desired script or you can use RadScriptBlock.

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
nitesh monga
Top achievements
Rank 1
answered on 07 Jan 2009, 09:26 AM
dear Vlad,

thanks for your help :)... it worked


thanks
nitesh monga
Tags
Grid
Asked by
nitesh monga
Top achievements
Rank 1
Answers by
Vlad
Telerik team
nitesh monga
Top achievements
Rank 1
Share this question
or