prabhathkvp
12 Jan 2011, 5:10 AM
Hi,
I Have a grid with GroupingStore .. I have used SummaryColumnConfig and added a SummaryRenderer for finding the Total Sum of a column..Now I want to add one more summaryRenderer for Average. how can i add that.
SummaryColumnConfig<Double> column1 = new SummaryColumnConfig<Double>("comapny", "Comapny", 120);
column1 .setSummaryRenderer(new SummaryRenderer() {
public String render(Number value, Map<String, Number> data) {
return "Sum";
}
});
SummaryColumnConfig<Double> column2 = new SummaryColumnConfig<Double>("sale", "Sale", 120);
col2.setSummaryType(SummaryType.SUM);
col2.setSummaryRenderer(new SummaryRenderer() {
public String render(Number value, Map<String, Number> data) {
return value.intValue() + "";
}
});
Is It possible to add two aggregation(Sum and Average) in grouping store..How is it possible??Plz Reply
I Have a grid with GroupingStore .. I have used SummaryColumnConfig and added a SummaryRenderer for finding the Total Sum of a column..Now I want to add one more summaryRenderer for Average. how can i add that.
SummaryColumnConfig<Double> column1 = new SummaryColumnConfig<Double>("comapny", "Comapny", 120);
column1 .setSummaryRenderer(new SummaryRenderer() {
public String render(Number value, Map<String, Number> data) {
return "Sum";
}
});
SummaryColumnConfig<Double> column2 = new SummaryColumnConfig<Double>("sale", "Sale", 120);
col2.setSummaryType(SummaryType.SUM);
col2.setSummaryRenderer(new SummaryRenderer() {
public String render(Number value, Map<String, Number> data) {
return value.intValue() + "";
}
});
Is It possible to add two aggregation(Sum and Average) in grouping store..How is it possible??Plz Reply