I am implementing IListServer
. Everything works fine except GetTotalSummary
. All examples that I've been able to find show the implementation of GetTotalSummary returning a Dictionary of items. In version 12, the interface for IListServer
has changed and no longer returns a dictionary. Instead, it returns a List<objects>
.
An example implementation of the interface is given here, but unfortunately the specific method that I need is not implemented.
I don't know how to fill this returning list so that I can see my records' count in grid footer. Any help is really appreciated :)
And here is my ascx for the dynamic grid I am filling:
<dx:ASPxGridView runat="server" Width="100%" ID="grdMain" ClientInstanceName="grid"
KeyFieldName="ID" AutoGenerateColumns="false" EnableRowsCache="false"
OnAutoFilterCellEditorCreate="grid_AutoFilterCellEditorCreate" OnAutoFilterCellEditorInitialize="grid_AutoFilterCellEditorInitialize" OnProcessColumnAutoFilter="grid_ProcessColumnAutoFilter">
<settingsbehavior allowfocusedrow="true" allowclienteventsonload="false" AllowGroup="false" autoexpandallgroups="true"
enablerowhottrack="True" columnresizemode="Control" />
<settings showverticalscrollbar="true" verticalscrollableheight="500" showgrouppanel="false"
showfilterrow="true" ShowHorizontalScrollBar="True" showfooter="True"/>
<styles>
<AlternatingRow Enabled="true" />
<Row Cursor="pointer" />
</styles>
<clientsideevents init="SGEntityListScript.OnInit" endcallback="SGEntityListScript.OnEndCallback" />
<SettingsBehavior EnableCustomizationWindow="true" />
<TotalSummary>
<dx:ASPxSummaryItem FieldName="ID" SummaryType="Count"/>
</TotalSummary>
</dx:ASPxGridView>
The last parameter of the IListServer.Apply method is the list of total summary descriptions requested by the control. Save them locally or immediately evaluate and save results. The GetTotalSummary method should return array of total summary values in the same order as they were requested in the Apply method.