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

Paging problem with AJAX in RadGrid

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hürkal
Top achievements
Rank 1
Hürkal asked on 11 Feb 2009, 10:58 AM

I have some problems with RadGrid if I wanna use the paging function with AJAX. I got this error message:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).


The page i wanna use the grid has a master-page. The controls on this page are ScriptManager, RadAjaxManager, RadCodeBlock and RadScriptCodeBlock. I cannot find any code to add into code-block controls, because there's nothing in aspx file about JavaScript codes.

I only use the codes like <% Response.Write(kategoriHiyerarsi); %>  , but it only writes text and not JS code. I do the same things on seperate page, which has not a master page, and get no error.

Thanks...

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 13 Feb 2009, 01:52 PM
Hello Hürkal,

You cannot use Response.Write if you are using ajax. You can replace this line with

<% =kategoriHiyerarsi %>

wrapped in RadScriptBlock.

I hope this helps.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Hürkal
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or