Hello, guys.
I have problem similar to described here http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-inside-nestedviewtemplate-of-another-dynamic-radgrid.aspx
But somehow doing things the same way I don't get the same result.
Here is what my logic is:
I have SelectableItems grid.
In the nested view I have ItemLots grid where I would like to show some information to user.
I have following grdSelectableItems_ItemCommand event hadler
protected void grdSelectableItems_ItemCommand(object source, GridCommandEventArgs e)
{
GridDataItem Row = e.Item as GridDataItem;
if (Row != null)
{
if (e.CommandName == RadGrid.ExpandCollapseCommandName)
{
if (!Row.Expanded)
ExpandNestedView (Row);
}
}
}
ExpandNestedView is the proecedure where I have the follwing peace of code
...
GridNestedViewItem NestedView = ParentGridRow.ChildItem;
...
RadGrid grdItemLots = (RadGrid)NestedView.FindControl("grdItemLots");
if (grdItemLots != null)
{
grdItemLots.NeedDataSource += new GridNeedDataSourceEventHandler(grdItemLots_NeedDataSource);
grdItemLots.Rebind();
}
...
grdItemLots_NeedDataSource procedure fills the datasource and assigns it to grdItemLots.DataSource.
grdItemLots has AllowPaging="True"
And also I wrote this little thing hoping that this will update grid's content after my actions with it.
protected void grdItemLots_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridNestedViewItem NestedView = (GridNestedViewItem)((sender as RadGrid).NamingContainer);
if (NestedView != null)
{
RadGrid grdItemLots = (RadGrid)NestedView.FindControl("grdItemLots");
if (grdItemLots != null)
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdItemLots, grdItemLots);
}
}
}
So the show begins when I try to go to the page different from #1 after expanding parent row. grdItemLots dissapears. BUT ! When I collapse and then expand the parent row I can see the data from the page 2.
What did I do wrong?
With respect, Sergey.
P.S. I'm using trial version 2010.1.519.40
I have problem similar to described here http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-inside-nestedviewtemplate-of-another-dynamic-radgrid.aspx
But somehow doing things the same way I don't get the same result.
Here is what my logic is:
I have SelectableItems grid.
In the nested view I have ItemLots grid where I would like to show some information to user.
I have following grdSelectableItems_ItemCommand event hadler
protected void grdSelectableItems_ItemCommand(object source, GridCommandEventArgs e)
{
GridDataItem Row = e.Item as GridDataItem;
if (Row != null)
{
if (e.CommandName == RadGrid.ExpandCollapseCommandName)
{
if (!Row.Expanded)
ExpandNestedView (Row);
}
}
}
ExpandNestedView is the proecedure where I have the follwing peace of code
...
GridNestedViewItem NestedView = ParentGridRow.ChildItem;
...
RadGrid grdItemLots = (RadGrid)NestedView.FindControl("grdItemLots");
if (grdItemLots != null)
{
grdItemLots.NeedDataSource += new GridNeedDataSourceEventHandler(grdItemLots_NeedDataSource);
grdItemLots.Rebind();
}
...
grdItemLots_NeedDataSource procedure fills the datasource and assigns it to grdItemLots.DataSource.
grdItemLots has AllowPaging="True"
And also I wrote this little thing hoping that this will update grid's content after my actions with it.
protected void grdItemLots_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridNestedViewItem NestedView = (GridNestedViewItem)((sender as RadGrid).NamingContainer);
if (NestedView != null)
{
RadGrid grdItemLots = (RadGrid)NestedView.FindControl("grdItemLots");
if (grdItemLots != null)
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdItemLots, grdItemLots);
}
}
}
So the show begins when I try to go to the page different from #1 after expanding parent row. grdItemLots dissapears. BUT ! When I collapse and then expand the parent row I can see the data from the page 2.
What did I do wrong?
With respect, Sergey.
P.S. I'm using trial version 2010.1.519.40