Hi
I am using radtabstrib and adding tabs and page views dynamically, page views itself has user controls inside, so I am recreating all this on each postback, however everything works perfect until I put radgrid inside the user control (it works ok with regular GridView) the error is the following.
The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
The exception throws as soon as I try to add user control with rad grid inside, into the page view
Please advice.
Thanks
I am using radtabstrib and adding tabs and page views dynamically, page views itself has user controls inside, so I am recreating all this on each postback, however everything works perfect until I put radgrid inside the user control (it works ok with regular GridView) the error is the following.
The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
The exception throws as soon as I try to add user control with rad grid inside, into the page view
private void RecreateTabsPageViews() |
{ |
if (Session["TabPageViewsContents"] == null) return; |
List<Control> PageViewsList = (List<Control>)Session["TabPageViewsContents"]; |
int index = 0; |
foreach (Control c in PageViewsList) |
{ |
CenterTabStribMultiPage.PageViews[index].Controls.Add(c); |
index++; |
} |
} |
Please advice.
Thanks