iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I am using the latest WebGrid 7. The grid seems to move columns very slowly when we have large amounts of data. It took 4 minutes to move 1 column that initally returned the dataset in less than 1 minute. Why would it take so long to move a column with lots of data (ie. 250,000 rows)? Is there a way to speed up this process?
Under such scenario, we suggest using paging for large data handling. We have some article in our blog regarding such scenario, article #1 and article #2
We are already using the paging method. We set the page size to 500 rows. Why would it take so long to move a column with only 500 rows on a page? The total record set returns 250,000 rows in less than 1 minute, but it is being paged and shows 500 pages of data.
Based on my discussion with the developer, I believe that the columing moving API which implemented in the WebGrid is using native browser javascript engine. Based on our test, 500 column moving will be a bit slow in IE, however in other browser, such as FireFox or Chrome it is quite fast.
We only use IE for our application. FireFox and Chrome is not an option for us. Can you please request that a performance enhancement for this issue. It should not be taking longer to move a column than what it takes to retirieve all the data.
Since we already using browser native API, we could not boost the performance anymore in the client side. However, you could try aborting the column moving in the client side and move the process to the server side. From your remark, it seems the server process will be quicker for you.
The workaround would be to abort the column moving in client side by returning false in the ColumnMove client side event handler and send the modified column position to the server. After ward we need to call WebGrid RefreshAll function in order to rebuild the column structure in the server during prepare data binding. You could save the column structure in a session on the server side.
Here is the snippet:
//Abort column move and invoke RefreshAllfunction wgTest_OnColumnMove(controlId, tblName, oldPost, newPost, currCol, destCol){ setTimeout(function () { var grid = ISGetObject("wgTest"); grid.AddInput("newColPost", [destCol.Name + "|" + oldPost, currCol.Name + "|" + newPost].join(";")); grid.RefreshAll(); }, 100); return false;}
protected void Page_Init(object sender, EventArgs e){ //Initialize column session if (Session["colList"] == null) { Session.Add("colList", new string[]{ "ID2", "checkbox", "ID", "Interest", "Price", "DateNow", "Description", "Link", "FirstName", "LastName", "FullName" }); }}
protected void Page_Load(object sender, EventArgs e){ //Determine if a there is a modified column if (!string.IsNullOrEmpty(Request["newColPost"])) { string[] cols = Request["newColPost"].Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); foreach (string col in cols) { string[] colSect = col.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries); string[] colList = (string[])Session["colList"]; colList[int.Parse(colSect[1]) - 1] = colSect[0]; Session["colList"] = colList; } }}
void wgTest_PrepareDataBinding(object sender, DataSourceEventArgs e){ if (!Page.IsPostBack || wgTest.ActionName == "RefreshAll") { wgTest.RootTable.Columns.Clear(); string[] colList = (string[])Session["colList"]; foreach (string col in colList) { WebGridColumn gridCol = null; switch (col) { //Build the WebGrid column } wgTest.RootTable.Columns.Add(gridCol); } }}
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname