Note that there are some explanatory texts on larger screens.

plurals
  1. POSorting and Paging issues
    text
    copied!<p>I would like to sort the whole dataset instead of page by page sorting.But for some reason it is sorting page by page instead of the whole dataset.Could you please help me in this issue.Iam using a grouping store.</p> <pre><code> var store = new FMP.AspNetJsonStore({ fields: [ { name: 'AssetID' }, { name: 'AssociationID' }, { name: 'Image' }, { name: 'StatusName' }, { name: 'ModelName' }, { name: 'IPAddress' }, { name: 'InScope', type: 'boolean' }, { name: 'ServicePlanName' }, { name: 'PricePlanName' }, { name: 'PricePlanDescription' }, { name: 'Program' }, { name: 'ServicePlanID' }, { name: 'Customer' }, { name: 'Black', type: 'float' }, { name: 'Cyan', type: 'float' }, { name: 'Magenta', type: 'float' }, { name: 'Yellow', type: 'float' }, { name: 'BlackPct' }, { name: 'CyanPct' }, { name: 'MagentaPct' }, { name: 'YellowPct' }, { name: 'PrinterMarkerSupplies' }, { name: 'PageCount' }, { name: 'BlackImpressions' }, { name: 'ColorImpressions' }, { name: 'PricePlanID' }, { name: 'ResponsibilityForAction' }, { name: 'PrinterSerialNumber' } ], totalProperty: "TotalCount", autoLoad: { params: { start: 0, limit: myPageSize} }, //autoLoad: true, proxy: new Ext.data.HttpProxy({ // Call web service method using GET syntax url: 'GetPrintersGrid.asmx/buildGrid', // Ask for Json response headers: { 'Content-type': 'application/json' }, method: "GET" }), //remoteSort: true, sortInfo: { field: 'PageCount', direction: "DESC" }, groupField: 'Customer', root: 'Records' }); </code></pre> <p>Here is my web service.</p> <pre><code>public PagedResult&lt;FMPAsset&gt; buildGrid(int start, int limit) { Guid AccountID = (Guid)Session["AccountID"]; string whereClause = "SELECT value a FROM XSP_AssetList_V AS a WHERE a.AccountID = GUID'" + AccountID + "'"; List&lt;FMPAsset&gt; fmpAssets = new List&lt;FMPAsset&gt;(); using (XSPAssetModel.XSPAssetEntities assetEntities = new XSPAssetEntities(b.BuildEntityConnectionString1("XSMDSN"))) { ObjectQuery&lt;XSP_AssetList_V&gt; assets = new ObjectQuery&lt;XSP_AssetList_V&gt;(whereClause, assetEntities); var assetPage = assets.OrderBy(x=&gt;x.StatusName).Skip(start).Take(limit); var totalAssetCount = assets.Count(); currentAssets = assetPage.ToList(); int currentAssetsCount = currentAssets.Count; string imgprefix = System.Configuration.ConfigurationManager.AppSettings["ImgPrefix"]; char[] separators = { '/' }; string appname = ""; int lastloc = imgprefix.Substring(0, imgprefix.Length - 1).LastIndexOfAny(separators); if (lastloc &gt; 6) { appname = imgprefix.Substring(lastloc + 1); } FMPAsset asset = new FMPAsset(); //StreamWriter sw = new StreamWriter("C:\\test.txt"); XSPPrinterMarkerSupplyModel.XSPPrinterMarkerSupplyEntities markerCtx = new XSPPrinterMarkerSupplyModel.XSPPrinterMarkerSupplyEntities(b.BuildEntityConnectionString1("XSMDSN")); for (int x = 0; x &lt; currentAssetsCount; x++) { asset = new FMPAsset(); asset.AssetID = currentAssets[x].AssetID.ToString(); asset.PricePlanID = currentAssets[x].PricePlanID.ToString(); asset.AssociationID = currentAssets[x].AssociationID; asset.ModelName = currentAssets[x].ModelName; asset.ResponsibilityForAction = currentAssets[x].ResponsibilityForAction; asset.IPAddress = (String.IsNullOrEmpty(currentAssets[x].PrinterIPAddress)) ? "No IP" : currentAssets[x].PrinterIPAddress; ; Guid id = currentAssets[x].AssetID; asset = SetCMYKvalues(asset, x); BuilldImpressionsValues(currentAssets[x], ref asset); fmpAssets.Add(asset); } var y = new PagedResult&lt;FMPAsset&gt;(); y.Records = fmpAssets; y.TotalCount = totalAssetCount; return y; } } </code></pre> <p>I also tried sorting all the records and then returning only first 10 records but i was not able to sort the whole dataset instead it was doing page page .</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload