Hi all,
i stick a little bit with realizing a common usecase. I hope someone can give me a short instruction about what to do.
We need to create Controls dynamically using AJAX / without full page submits.
A simple example would be the following:
We have a regular ASP-Button inside an other control. When someone click the button there should start an AjaxRequest to the CodeBehind Class. The method in the CodeBehind Class should generate a new RadComboBox with data from an XML-File and place the RadComboBox in the parent Control. Of course, when the AJAX Request finished the RadComboBox should be displayed in the Client, but without rerendering the hole RadPane. Using a PlaceHolder is also no Option because i dont know how much Controls i need. And placeing all of them in the same PlaceHolder which is connected by RadAjaxManager means that all new Controls in the PlaceHolder will be rerendered when i update the PlaceHolder. Also the dynamic created Controls are NOT persistent. Its hard to realize that. That means I've to recreate them on each PageLoad / Partial Load of the Parent.
Isn't it possbile to create a Control, which is persistent like if I have create it declarativly?
Building a RadComboBox and fill it with XML is also no problem.
I cant define the Controls declaratively and just hide/show them, because we dont know which kind of control the user will choose.
Using the RadAjaxManager also doesnt work in my tests because wasn't able to tell him the ID of the TargetControlID to rerender (because it soes not exist at the moment). Rerender the surrounding Control was also not as good as we expected, because it contains much other controls which should not rerender.....
Does someone have a suggestion for me ?
Thank you
ragards
Alex
i stick a little bit with realizing a common usecase. I hope someone can give me a short instruction about what to do.
We need to create Controls dynamically using AJAX / without full page submits.
A simple example would be the following:
We have a regular ASP-Button inside an other control. When someone click the button there should start an AjaxRequest to the CodeBehind Class. The method in the CodeBehind Class should generate a new RadComboBox with data from an XML-File and place the RadComboBox in the parent Control. Of course, when the AJAX Request finished the RadComboBox should be displayed in the Client, but without rerendering the hole RadPane. Using a PlaceHolder is also no Option because i dont know how much Controls i need. And placeing all of them in the same PlaceHolder which is connected by RadAjaxManager means that all new Controls in the PlaceHolder will be rerendered when i update the PlaceHolder. Also the dynamic created Controls are NOT persistent. Its hard to realize that. That means I've to recreate them on each PageLoad / Partial Load of the Parent.
Isn't it possbile to create a Control, which is persistent like if I have create it declarativly?
Building a RadComboBox and fill it with XML is also no problem.
I cant define the Controls declaratively and just hide/show them, because we dont know which kind of control the user will choose.
Using the RadAjaxManager also doesnt work in my tests because wasn't able to tell him the ID of the TargetControlID to rerender (because it soes not exist at the moment). Rerender the surrounding Control was also not as good as we expected, because it contains much other controls which should not rerender.....
Does someone have a suggestion for me ?
Thank you
ragards
Alex