﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><pubDate>Mon, 21 Jun 2010 23:40:50 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid column Moving Slow with Lots of Data</category><description>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt; Here is the snippet:&lt;/p&gt;&lt;pre&gt;//Abort column move and invoke RefreshAll&lt;br /&gt;function wgTest_OnColumnMove(controlId, tblName, oldPost, newPost, currCol, destCol)&lt;br /&gt;{&lt;br /&gt;    setTimeout(function ()&lt;br /&gt;    {&lt;br /&gt;        var grid = ISGetObject("wgTest");&lt;br /&gt;                &lt;br /&gt;        grid.AddInput("newColPost", [destCol.Name &amp;#43; "|" &amp;#43; oldPost, currCol.Name &amp;#43; "|" &amp;#43; newPost].join(";"));&lt;br /&gt;&lt;br /&gt;        grid.RefreshAll();&lt;br /&gt;&lt;br /&gt;    }, 100);&lt;br /&gt;&lt;br /&gt;    return false;&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;protected void Page_Init(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    //Initialize column session&lt;br /&gt;    if (Session["colList"] == null)&lt;br /&gt;    {&lt;br /&gt;        Session.Add("colList", new string[]{&lt;br /&gt;            "ID2", &lt;br /&gt;            "checkbox",&lt;br /&gt;            "ID",&lt;br /&gt;            "Interest",&lt;br /&gt;            "Price",&lt;br /&gt;            "DateNow",&lt;br /&gt;            "Description",&lt;br /&gt;            "Link",&lt;br /&gt;            "FirstName",&lt;br /&gt;            "LastName",&lt;br /&gt;            "FullName"&lt;br /&gt;        });&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    //Determine if a there is a modified column &lt;br /&gt;    if (!string.IsNullOrEmpty(Request["newColPost"]))&lt;br /&gt;    {&lt;br /&gt;        string[] cols = Request["newColPost"].Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt;        foreach (string col in cols)&lt;br /&gt;        {&lt;br /&gt;            string[] colSect = col.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt;&lt;br /&gt;            string[] colList = (string[])Session["colList"];&lt;br /&gt;            colList[int.Parse(colSect[1]) - 1] = colSect[0];&lt;br /&gt;            Session["colList"] = colList;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;void wgTest_PrepareDataBinding(object sender, DataSourceEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (!Page.IsPostBack || wgTest.ActionName == "RefreshAll")&lt;br /&gt;    {&lt;br /&gt;        wgTest.RootTable.Columns.Clear();&lt;br /&gt;&lt;br /&gt;        string[] colList = (string[])Session["colList"];&lt;br /&gt;        foreach (string col in colList)&lt;br /&gt;        {&lt;br /&gt;            WebGridColumn gridCol = null;&lt;br /&gt;            switch (col)&lt;br /&gt;            {&lt;br /&gt;                //Build the WebGrid column&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            wgTest.RootTable.Columns.Add(gridCol);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><pubDate>Mon, 21 Jun 2010 15:12:45 GMT</pubDate><dc:creator>jcrendulic</dc:creator><category>WebGrid column Moving Slow with Lots of Data</category><description>&lt;p&gt;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.  &lt;/p&gt;</description></item><item><title>WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><pubDate>Mon, 21 Jun 2010 06:03:45 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid column Moving Slow with Lots of Data</category><description>&lt;p&gt;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.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><pubDate>Fri, 18 Jun 2010 10:21:16 GMT</pubDate><dc:creator>jcrendulic</dc:creator><category>WebGrid column Moving Slow with Lots of Data</category><description>&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><pubDate>Thu, 17 Jun 2010 22:46:14 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid column Moving Slow with Lots of Data</category><description>&lt;p&gt;Under such scenario, we suggest using paging for large data handling. We have some article in our blog regarding such scenario, &lt;a target="_blank" href="http://intersoftpt.wordpress.com/2008/04/04/faster-than-fastest-aspnet-grid/"&gt;article #1&lt;/a&gt; and &lt;a target="_blank" href="http://intersoftpt.wordpress.com/2008/04/07/faster-than-fastest-aspnet-grid-part-ii/"&gt;article #2&lt;/a&gt;&lt;/p&gt;</description></item><item><title>WebGrid column Moving Slow with Lots of Data</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-column-Moving-Slow-with-Lots-of-Data/</link><pubDate>Thu, 17 Jun 2010 17:14:30 GMT</pubDate><dc:creator>jcrendulic</dc:creator><category>WebGrid column Moving Slow with Lots of Data</category><description>&lt;p&gt;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?&lt;/p&gt;</description></item></channel></rss>