Is there way to custom number the rows header?

Posted by: chetan.shetty on 19 July 2019, 2:16 am EST

  • Posted 19 July 2019, 2:16 am EST

    Hi,

    I wanted to know whether it’s possible to re-number the rows header and skip the top row. [Attached image in comments]. I want the grid to skip the first row as I use it to display headers.

    Also is possible, can we remove the summation notation next to the computed row in the row header.

    Sorry for the inconvenience if this has already been answered before but I couldn’t find it anywhere.

    Thank you in advance.

  • Posted 19 July 2019, 2:17 am EST - Updated 3 October 2022, 7:51 pm EST

  • Posted 19 July 2019, 7:39 am EST

    Hi Chetan,

    Regarding the number on row headers:

    Yes, you may change the number on row headers by overriding the udpateCell method of CellFactory. Please refer to the code snippet and the sample below:

    let oldUpdateCell = flexSheet.cellFactory.updateCell
    
    flexSheet.cellFactory.updateCell = function(panel, row, col, cell, rng, update) {
      oldUpdateCell.call(this, panel, row, col, cell, rng, update);
      if(panel == flexSheet.rowHeaders) {
        cell.innerHTML = row == 0 ? '' : row;
      }
    }
    

    https://stackblitz.com/edit/js-ydh7vb

    Regarding summation icon on row header:

    A summation icon is not added on the group row or column footer as you can observe in the above sample. Please make sure that you have not added the icon manually.

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels