View Full Version : [CLOSED] how to reduce loading time for gridpanel with large data

Dec 16, 2013, 5:06 AM
If the gridpanel bind with a large data source, it must need more loading time.

Is it help to reduce the loading time, if I enable paging in gridpanel?

Dec 16, 2013, 1:10 PM
Hi @trePjt,

Yes, paging is a common solution for such cases.

Please clarify how many records do you load to the GridPanel? How many columns does the GridPanel have?

For the beginning, please just add a PagingToolbar to the GridPanel's BottomBar and specify some PageSize. For example, PageSize="100". Maybe, local paging will be enough for you.

Dec 17, 2013, 1:58 AM
hi Daniil,

According to this example (http://examples2.ext.net/#/GridPanel/Paging_and_Sorting/JSON_WebService/), I have implement the paging like following.

Config the gridpanel in code behind

Store store1 = this.pnlSelect.GetStore();
AjaxProxy proxy = new AjaxProxy();
proxy.Url = "../../JsonProvider/Master/DropDown.ashx?master=tsklst&pageenable=1";
JsonReader reader = new JsonReader();
reader.Root = "data";
reader.TotalProperty = "totalCount";

DropDown.ashx will return a Json string

public void ProcessRequest(HttpContext context)
string strJson = "";
context.Response.ContentType = "text/json";
string action = RequestUtility.GetQueryString("action");
switch (action)
strJson = cboDropDown(context.Request);
catch (Exception ex)
strJson = @"{success: false, error: '" + ex.ToString() + "'}";

private string cboDropDown(HttpRequest Request)
string strJson = "";
System.Data.DataSet ds = null;
string type = RequestUtility.GetQueryString("type");
string master = RequestUtility.GetQueryString("master");
string filterkey = RequestUtility.GetQueryString("filterkey");
bool allFlag = FacadeHelper.AllFlagToBool(RequestUtility.GetQuery String("all"));

string message = RequestUtility.GetQueryString("query");
ds = MasterDB.Query(master, message, type, filterkey);

if (allFlag)

System.Data.DataSet ds2 = ds.Copy();

string page = RequestUtility.GetQueryString("pageenable");

if (page.CompareTo("1") == 0)
int start = Int32.Parse(RequestUtility.GetQueryString("start").ToString());
int limit = Int32.Parse(RequestUtility.GetQueryString("limit").ToString());

for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
if(i>=start && i< start+limit)

strJson = string.Format("{{totalCount:{1},'data':{0}", JSON.Serialize(ds2).Substring(10), ds.Tables[0].Rows.Count);

return strJson;

But the problem is, my grid also have header filter and implement as version 2.2 style.
Like this,

<ext:Column ID="Column1" runat="server" Text="_TSLTSKNO" DataIndex="TSLTSKNO" Flex="5">
<ext:TextField ID="TSLTSKNOFilter" runat="server">
<Change Handler="applyFilter(this);" Buffer="250" />
<ext:ClearButton ID="ClearButton1" runat="server" />

So the filter can just affect on the current page only. Are there any solution? Did update to 2.4 and use FilterHeader plugin instead help?

Dec 17, 2013, 11:30 AM
Yes. if you need to filter across all the records, you have to implement remote filtering.

Yes, a FilterHeader is a possible solution. We have an example of remote filtering.

Dec 18, 2013, 12:01 AM
Thanks Daniil. I will study on this case. You can mark this thread as closed.