Rank: Member Groups: Member
Joined: 6/4/2012 Posts: 13
|
How I can load a grid that is inside a TabStrip?
I tried with this
System.Web.UI.Control tabPageContent = null;
string tabPagePath = "DesempenoPorEvaluar.ascx"; tabPageContent = LoadControl(tabPagePath); EO.Web.Grid grid = (EO.Web.Grid)tabPageContent.FindControl("GridDesempeno");
int nTot = grid.Items.Count;
but did not work. The control grid is found but no rows. The grid comes with no rows (nTot = 0).
thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Your code is correct. However if you want the Grid to retain its contents when you dynamically load the Grid, you must load the Grid at the very early stage of the page's life cycle before ViewState is being loaded, such as OnInit event. Page_Load event is too late for that.
Thanks!
|