Won't Fix
Last Updated: 20 Jul 2015 14:14 by ADMIN
ADMIN
Viktor Tachev
Created on: 30 Jun 2014 08:55
Category: Ajax
Type: Feature Request
0
When RadTextBox is placed in an Ajax-enabled container that is not initially visible there is an error when the container is shown
The RadTextBox are placed inside a asp gridview. When an item from the combo box in the page is selected. The server side logic hide one of the columns of the gridview using such approach:

grdExamples.Columns[2].Visible = false;

This, however, keeps the controls inside the vary same GridView. So during Ajax their ScriptDescriptrs got registered in the ScriptManager. When the result $create execute client side, the JS error is thrown.

It can not be fixed in general, because we can not cover scenarios where the control is:

1. Visible

2. In the control collection. (have .Page!=null)

3. All it's parents are visible.

4. Does not render, because it's parent control ( the gridview) decides not to render some of it's childs.

When all of 1,2,3,4 are true, the control will describe, but not visible in the output HTML resulting in error.

It will happen in all controls (not only RadTextBox), when you are using the RadAjaxManager. Since the manager registers the ScriptDescriptors manually per control, before the Render of the page, therefore it can't know if the control is "Really Visible". This is limitation of the manager, that can not be changed without breaking fundamentals of how it works.
0 comments