Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
igGrid Summaries column settings
posted

I am trying to specify what summary feature is displayed for columns in a grid. It doesn't display my settings; it just shows "count = 5" and displays nothing for one of the summaries. I want to show the sum of the rows for two of the columns.

This is a snippet of  the code I'm using in MVC razor (sorry its in VB):

.Columns(Function(columns)
                     columns.For(Function(c) c.SchemaItem).HeaderText("Schema").DataType("string").Width("200")
                     columns.For(Function(c) c.MarkAvailable).HeaderText("Mark Available").DataType("int").Width("80")
                     columns.For(Function(c) c.Mark).HeaderText("Mark").DataType("int").Width("80")
                 End Function) _
        .Features(Function(features)
                      features.Sorting().Mode(SortingMode.Single)
                      features.Selection().Mode(SelectionMode.Row).MultipleSelection(False)
                      features.Summaries() _
                          .ColumnSettings(Function(cs) cs.ColumnSetting() _
                                            .ColumnKey("MarkAvailable") _
                                              .SummaryOperands(Function(so) so.SummaryOperand() _
                                                .RowDisplayLabel("Total") _
                                                .Type(SummaryFunction.Sum) _
                                                .Active(True) _
                                                .DecimalDisplay(0) _
                                              ) _
                                            .ColumnKey("Mark") _
                                              .SummaryOperands(Function(so) so.SummaryOperand() _
                                                .RowDisplayLabel("Total") _
                                                .Type(SummaryFunction.Sum) _
                                                .Active(True) _
                                                .DecimalDisplay(0) _
                                              ) _
                                          ) _
                        .ShowDropDownButton(False).ShowSummariesButton(False) _
                        .CompactRenderingMode(SummaryCompactRenderingMode.Auto)
                  End Function) _

 

Regards Ed