If i use webgrid 1.6 version - Page_Load have one execution.
If i use webgrid 1.7 version or higher - Page_Load have many executions - that corrupt my program logic.
If i use webgrid 1.6 version - Page_Load have one execution.
If i use webgrid 1.7 version or higher - Page_Load have many executions - that corrupt my program logic.
Hi,
We have not seen this problem before. Would you please post some source files to help us to locate this problem?
Thank you.
protected void Page_Load(object sender, EventArgs e)
{
Aspose.Grid.Web.GridWeb gridweb = new Aspose.Grid.Web.GridWeb();
Table1.Rows[0].Cells[0].Controls.Add(gridweb);
return;
}
if i set breakpoint on the "Aspose.Grid.Web.GridWeb gridweb = new Aspose.Grid.Web.GridWeb();"
i get 9 breaking.
if i set breakpoint on the "return;"
i get 1 breaking.
i use MS VS 2005.
Hi,
Since version 1.7, all the client files including scripts and images are embeded into the control's dll. That means you never need to create an "agw_client" web folder on your IIS server. But client pages need to recall the original page to get these files. If you create the GridWeb control dynamically in the Page_Load event, the event will be fired each time the page need to get a client-side file. I suggest that you may put the grid creating and inserting code in the Page_Init event block to get better performance.
BTW, I think your sample code has a problem. you forgot to assign an ID for the newly created grid. You should give every grid an ID, otherwise you will get an error at run time.
Aspose.Grid.Web.GridWeb gridweb = new Aspose.Grid.Web.GridWeb();
Table1.Rows[0].Cells[0].Controls.Add(gridweb);
gridweb.ID = "grid1";
Since version 1.7, all the client files including scripts and images are embeded into the control's dll. That means you never need to create an "agw_client" web folder on your IIS server. But client pages need to recall the original page to get these files.
I can am mistaken. Can be it is meaningful make this function switch-controlled? In fact then it is necessary for developers to adapt their program under given grid. And also it slows downloading a little.
If you create the grid in the aspx file, you won't notice this issue. But if you create the control dynamically, you should treat the creating code carefully to avoid slowing down performance. Creating the grid control before all other initializing code is the most optimized process.
Creating the grid control before all other initializing code is the most optimized process.
It is difficult for my program architecture.
In my program page is created dynamically:
1. Input (analyze user post)
2. Compute program logic (query to database etc)
3. Output (generate page: create and fill controls)
Of course, it is possible alter my program.
But i think that this architecture is reasonably.