Radgrid inside NestedViewTemplate causing looping

3 posts, 0 answers
  1. Eduardo
    Eduardo avatar
    2 posts
    Member since:
    Apr 2016

    Posted 27 Apr Link to this post

    Hi community,
    I am facing the following challenge:

    I have a Radgrid that contains a NestedViewTemplate and inside it has another Radgrid that bounds data on item command. Everything works fine until  i try to rebind. If i don´t expand any row everything works fine with the parent grid, i can change parameters on the data source and it rebinds without any problem. But if i expand the row the issue begins, because when i try to rebind the parent it takes way too long, sometimes an exception occurs. For example normally the parent loads 17 rows, which takes up to 14 seconds, but when i expand a row and try to rebind the parent to have results from other parameter, it takes 85 seconds or more, which is too much. Like if the child grids are somehow rebinding, which shouldn´t be happening because the data bounds on item command... . I´m using 2012 Q3 of telerik controls.

    I don´t really know why this happens or if i´m doing something wrong. Any idea why is this happening?

    Here is the code for the child grid to bind the data:

     protected void grdODLSummary_ItemCommand(object sender, GridCommandEventArgs e)
        {
            string command = e.CommandName;
            if (command == "ExpandCollapse")
            {
                 GridDataItem eitem = e.Item as GridDataItem;
                 GridNestedViewItem NestedItem = eitem.ChildItem;
                 RadGrid grPR;
                  if (NestedItem != null)
                  {
                      grPR = NestedItem.FindControl("grdSummaryPR") as RadGrid;

                      if (grPR != null)
                      {
                          grPR.Rebind();
                      }
                  }
            }
        }

  2. Eduardo
    Eduardo avatar
    2 posts
    Member since:
    Apr 2016

    Posted 27 Apr Link to this post

    Nevermind... I found the answer

    http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 02 May Link to this post

    Hi,

    Thank you for the followup.

    I am glad to know that you have managed to resolve your issue. And thank you for pointing to the query solution, as it may help others having a similar issue.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top