We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Summary Title only in fist Column?

Hallo,

the title of the Summary is displayed only on the first Column. That is a bad idea when the title is longer than the width of the first column....

my source code for grid init:

// Grid init

$("#gridView").ejGrid({

locale: "de-DE",

showColumnChooser: true,

dataSource: window.gridData,

showSummary: true,

allowCellMerging: true,

summaryRows: [

{

title: "Einnahmen", summaryColumns: [

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Mittelanmeldung", dataMember: "Mittelanmeldung", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Planansatz", dataMember: "Planansatz", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "IstVorjahr", dataMember: "IstVorjahr", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "PlanansatzVorjahr", dataMember: "PlanansatzVorjahr", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "ErgebnisVorVorjahr", dataMember: "ErgebnisVorVorjahr", format: "{0:n2}" },

]

},

{

title: "Ausgaben", summaryColumns: [

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Mittelanmeldung", dataMember: "Mittelanmeldung", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Planansatz", dataMember: "Planansatz", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "IstVorjahr", dataMember: "IstVorjahr", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "PlanansatzVorjahr", dataMember: "PlanansatzVorjahr", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "ErgebnisVorVorjahr", dataMember: "ErgebnisVorVorjahr", format: "{0:n2}" },

]

},

{

title: "Summen", summaryColumns: [

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Mittelanmeldung", dataMember: "Mittelanmeldung", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Planansatz", dataMember: "Planansatz", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "IstVorjahr", dataMember: "IstVorjahr", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "PlanansatzVorjahr", dataMember: "PlanansatzVorjahr", format: "{0:n2}" },

{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "ErgebnisVorVorjahr", dataMember: "ErgebnisVorVorjahr", format: "{0:n2}" },

]

},

],

editSettings: {

allowEditing: true, allowAdding: false, allowDeleting: false,

editMode: ej.Grid.EditMode.Batch

},

columns: [

{ field: "KOTyp", headerText: "KO-Typ", allowEditing: false, width: 70 },

{ field: "KO", headerText: "Kontierungsobjekt", allowEditing: false },

{ field: "Sachkonto", allowEditing: false },

{ field: "Mittelanmeldung", headerText: "Mittelanmeldung 2015", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, format: "{0:n2}", width: 170 },

{ field: "Planansatz", headerText: "Planansatz 2015", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, format: "{0:n2}", width: 120 },

{ field: "IstVorjahr", headerText: "Ist 2014", textAlign: ej.TextAlign.Right, format: "{0:n2}", allowEditing: false, width: 70 },

{ field: "PlanansatzVorjahr", headerText: "Planansatz 2014", textAlign: ej.TextAlign.Right, format: "{0:n2}", allowEditing: false, width: 120 },

{ field: "ErgebnisVorVorjahr", headerText: "Ergebnis 2013", textAlign: ej.TextAlign.Right, format: "{0:n2}", allowEditing: false, width: 120 }

],

queryCellInfo: function (args) {

var value = args.text.replace(".", "");

value = value.replace(",", ".");

var $element = $(args.cell);

switch (args.column.field) {

case "IstVorjahr":

if (parseFloat(value) < 0)

$element.css("color", "red");

break;

}

}

});


Attachment: gridSummary_7f8d5fa0.zip

1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 15, 2015 12:46 PM UTC

Hi Martin,


We considered the requirement “Title For the Summary Column hidden in the reduced width of the column” as a bug. We have logged a report on this and will fix the issue internally, also the fix will be included in Volume 3 Service Pack 1, which has been scheduled to be rolled out in the month of October 2015.


We have also created an incident internally to have a follow up with this issue.


Regards,

Seeni Sakthi Kumar S.


Loader.
Up arrow icon