Docs
API
  • summary

    Mixed

    Enables summary for column.
    Also requires to enable property summary for core object.
    Possible values:
    average - Gets the average value in the column.
    count - Gets the count of rows in column.
    min - Gets the minimum value in the column.
    max - Gets the maximum value in the column.
    sum - Sums the column values.

    Example

    
    new FancyGrid({
      ...,
      summary: true,
      columns: [{
        ...,
    	summary: 'sum'
      },{
    

    Example: summary row position

    
    new FancyGrid({
      ...,
      summary: {
        position: 'bottom'
      },
      columns: [{
        ...,
    	summary: 'sum'
      },{
    

    Example: handler

    
    new FancyGrid({
      ...,
      summary: {
        position: 'bottom'
      },
      columns: [{
        ...,
    	summary: function(){
    	  return 'Total'
    	}
      },{
    

    Example: object

    
    new FancyGrid({
      ...,
      summary: {
        position: 'bottom'
      },
      columns: [{
        ...,
    	summary: {
    	  type: 'count',
    	  fn: function(value){
    		return '' + value + '';
    	  }
    	}
      },{
    

    Default

    
    undefined