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

lost control in a radgrid

1 Answer 48 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Layo
Top achievements
Rank 1
Layo asked on 30 Aug 2012, 02:14 PM
hi everyone.
I have a problem with radgrid three levels.
At the third level, in a cell I add a control with typical: "Controls.Add (" MyControl ")"
But when I press a button outside the radgrid performing a "PostBack", independent of this, I look at the grid level by level and when  I get  the cell where i added the control, I see it  disappeared , at some point I lost it and do not know where.
if anyone knows anything I would be very useful.
thank you very much.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 03 Sep 2012, 01:50 PM
Hi,

Most probably the problem comes from the fact that you only add the button as a response to some event and then you are not recreating it on postback. That is the reason why it vanishes when button is clicked.

When you are using dynamically generated control, you must make sure that the control is recreated on every postback. You could check this great article from the Infinities Loop blog for more information on using dynamic controls.

Regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Layo
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or