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

GridFilter lost filter menu after first filtering in dynamically added user control

2 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shannnon
Top achievements
Rank 1
Shannnon asked on 17 Aug 2011, 08:20 PM
I am using RadGrid of AJAX, the grid is in a user control which is add DYNAMICALLY when a button is click, my issue here is that after the user control is loaded, i can do filtering in the grid the first time, but if i filter again, I got JS error :Unable to get value of the property '_showFilterMenu': object is null or undefined. I place RadAJAXManager only in the user control, and in parent page, there is only RadScriptManager. Why does this happen? This works if I add user controls at design time, but in my case, there are several grids i need to load base on different button click and each grid contains hundreds of rows, so concerning about performance, I have to add them dynamically. Please help me out.

Thank you!

 

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 22 Aug 2011, 03:27 AM
Hello Shannnon,

Firslt I should mention that placing the RadAjaxManager in a dynamically loaded control is not suggested. Because at the moment the control is added on the Page, it is too late for the RadAjaxManager to initialize properly and respectively to behave properly. Therefore I suggest that you put the RadAjaxManager on the main page. Then you can add  the ajax settings for the controls in the user control either using RadAjaxManagerProxy or by adding them dynamically. For more information, refer to the below articles:
http://www.telerik.com/help/aspnet-ajax/ajax-user-controls.html
http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html
http://www.telerik.com/help/aspnet-ajax/ajax-add-ajaxsettings-programmatically.html

Additionally, please confirm that you are using the latest version of the controls. Also, try temporary disabling ajax and let me know if it all works find withouth it.

Greetings,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Shannnon
Top achievements
Rank 1
answered on 22 Aug 2011, 06:20 PM
Hi Lana,

Thanks for the reply. Both of your ways work, I used RadAjaxManagerProxy in user controls, and also tried to disable the ajax, they all work.
Thanks a lot!
Tags
Grid
Asked by
Shannnon
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Shannnon
Top achievements
Rank 1
Share this question
or