Nesting WebContol forms

4 posts, 0 answers
  1. sircutbreaker
    sircutbreaker avatar
    111 posts
    Member since:
    Oct 2007

    Posted 06 Nov 2012 Link to this post

    I have a radgrid with a webusercontrol as the form.. in that form, there is another radgrid with yet another webusercontrol as the form... when i go into edit mode in that one, I want to make the (update/cancel) buttons disappear from the first one... How can I do this?

    https://www.evernote.com/shard/s9/sh/da95d18c-b3ac-4e2b-89b4-17f9e91951d6/fa7c7ca22fdc41ec37bda2d9816211d5/res/bcfe8a11-1275-4510-9756-dbf32ee22dcf/skitch.png
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 09 Nov 2012 Link to this post

    Hello Jeffrey,

    I am experiencing difficulties understanding your issue. Could you please elaborate more on what do you mean by "as the form"? Do you mean ItemTemplate? Additionally it would be best if you could send us your aspx code.

    Regards,
    Angel Petrov
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. sircutbreaker
    sircutbreaker avatar
    111 posts
    Member since:
    Oct 2007

    Posted 09 Nov 2012 Link to this post

    I have a grid with a webusercontol. When I go to edit, that usercontrol has another radgrid in it.  I want to know how I can determine when I put that radgrid into edit mode so that I can make the first set of buttons (Update, Insert, Cancel) not visible... When I take the second grid out of edit mode, I want to make the buttons visible again.

    Does that make sense?
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 12 Nov 2012 Link to this post

    Hi Jeffrey,

    One way to implement the logic is by hooking up to the Pre_Render of the RadGrid. You have to check if both grids are in edit mode. This can be accomplished by checking if EditIndexes of the RadGrid is greater than 0. If both grids meet this condition you just have to select the update and cancel button of the outer grid and set Visible to false. If not, you should set Visible to true. Attached is a project which demonstrates this approach.

    Kind regards,
    Angel Petrov
    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.
Back to Top