Sets or retrieves the data format converter for the grid footer row (footer format).
Format converters are used to perform client-side data transformations, for example, encode html control characters or apply particular date or number formats.
var value = obj.getFooterFormat();
obj.setFooterFormat(value);
obj.onFooterFormatChanging = function(value){...};
obj.onFooterFormatChanged = function(value){...};
obj.onFooterFormatError = function(value){...};
Encoding html control characters (<
, >
, "
, &
).
obj.setFooterVisible(true);
obj.setFooterData("<bottom text>", 0);
obj.setFooterFormat(new AW.Formats.String, 0);
obj.setFooterText(function(i){
var data = this.getFooterData(i);
var format = this.getFooterFormat(i);
return format ? format.dataToText(data) : data;
});
Applying number format
var number = new AW.Formats.Number;
number.setTextFormat("$ #,###.##");
obj.setFooterVisible(true);
obj.setFooterData("1234567.890", 0);
obj.setFooterFormat(number, 0);
obj.setFooterText(function(i){
var data = this.getFooterData(i);
var format = this.getFooterFormat(i);
return format ? format.dataToText(data) : data;
});
To activate the data/text transformations set the footer text property to the converter function, like in example above.
Overview: using format converters
Grid templates: footer
Footer model: text, image, tooltip, link, value, data
Format properties: cell, selector, header, top, bottom