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();
}
}
}
}