Jul 09, 2013, 9:40 PM
-
-
Jul 10, 2013, 2:04 PMBad news.
A Summary's RemoteRoot doesn't work. Here is a opened bug on the Sencha forums.
http://www.sencha.com/forum/showthread.php?261179
Created an Issue to monitor.
https://github.com/extnet/Ext.NET/issues/295
Good news.
We can suggest the following workaround.
1. The Summary configuration.
2. The JsonReader configuration.<ext:Summary runat="server" Dock="Top" RemoteRoot="data.summaryData" />
3. Change a ASHX's response to:<ext:JsonReader runat="server" IDProperty="Id" TotalProperty="data.total" Root="data.data" />
4. Add this override to the page's <head>.context.Response.Write(JSON.Serialize(new { data = new Paging<object>(rangeData, data.Count), summaryData = new { Name = "Hello 1", Cost = 10000, Date = "Hello 2" } }));
Ext.grid.feature.Summary.override({ createSummaryRecord: function(view) { var columns = view.headerCt.getVisibleGridColumns(), info = { records: view.store.getRange() }, colCount = columns.length, i, column, summaryRecord = this.summaryRecord || (this.summaryRecord = new view.store.model(null, view.id + '-summary-record')); // Set the summary field values summaryRecord.beginEdit(); if (this.remoteRoot) { if (view.store.proxy.reader.rawData) { summaryRecord.set(view.store.proxy.reader.rawData.summaryData); // hardcoded "summaryData" } } else { for (i = 0; i < colCount; i++) { column = columns[i]; // In summary records, if there's no dataIndex, then the value in regular rows must come from a renderer. // We set the data value in using the column ID. if (!column.dataIndex) { column.dataIndex = column.id; } summaryRecord.set(column.dataIndex, this.getSummary(view.store, column.summaryType, column.dataIndex, info)); } } summaryRecord.endEdit(true); // It's not dirty summaryRecord.commit(true); summaryRecord.isSummary = true; return summaryRecord; } });
-
Jul 10, 2013, 7:03 PMIt's worked for me but on some pages it's generate those js errors:
This is only fot NOTE. Thanks guys:) I'll wait for fix then for now it's enough.NS_ERROR_FAILURE: Failure doc.execCommand(cmd, false, (value == undefined ? null : value)); ext.axd?v=37843 (row 145305) TypeError: records is null window.eval.call(window, result.script);
-
Apr 27, 2016, 1:11 PMSencha fixed the bug. The latest Ext.NET 3.x (3.3) and 4.x (4.0 and upcoming 4.1) includes this fix.
The RemoteProperty has been added to the Ext.Net.AbstractSummary class in the upcoming 4.1.0 and it works well.
Similar Threads
-
[CLOSED] Display value of sum all items when Store remote is on?
By ViDom in forum 2.x Legacy Premium HelpReplies: 3Last Post: Jun 28, 2013, 4:47 PM -
[CLOSED] Gridpanel with remote store configured display data - 1 items.
By ViDom in forum 2.x Legacy Premium HelpReplies: 3Last Post: Jun 25, 2013, 4:45 PM -
problem with Js returned by the GET request trigger POST request
By Soy in forum 2.x HelpReplies: 0Last Post: Apr 18, 2013, 11:03 AM -
Grouping summary and summary in one grid
By PetrSnobelt in forum 2.x HelpReplies: 1Last Post: Apr 16, 2013, 9:59 AM -
[CLOSED] Remote grouping or grouping summary for GridPanel
By jchau in forum 1.x Legacy Premium HelpReplies: 1Last Post: Nov 08, 2009, 10:23 PM