Show NestedViewTemplate on Edit command

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    1 posts
    Member since:
    Jul 2019

    Posted 19 Jul 2019 Link to this post


    I need to show the NestedViewTemplate for a row when that row is edited using in-place editing. How can I achieve this? So far what I have tried was calling the expand event on the Edit command like so:

    if(e.CommandName == RadGrid.EditCommandName)
               e.Item.FireCommandEvent(RadGrid.ExpandCollapseCommandName, new GridExpandCommandEventArgs(e.Item, sender, e));
               //e.Item.Expanded = true;


    The RadGrid.ExpandCollapse command is correctly being fired but the in-place editing is showing and the NestedViewTemplate is not showing as intended.

  2. Eyup
    Eyup avatar
    3962 posts

    Posted 24 Jul 2019 Link to this post

    Hi Ryan,

    You can achieve this requirement using the following approach:
    protected void RadGrid1_PreRender(object sender, EventArgs e)
        foreach (GridEditableItem item in RadGrid1.Items)
            if (item.IsInEditMode)
                item.Expanded = true;

    I hope this will prove helpful.

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top