lost control in a radgrid

Thread is closed for posting
2 posts, 0 answers
  1. Layo
    Layo avatar
    16 posts
    Member since:
    Aug 2012

    Posted 30 Aug 2012 Link to this post

    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.
  2. Andrey
    Andrey avatar
    836 posts

    Posted 03 Sep 2012 Link to this post


    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top