Set Custom Column Name For New Column

Posted by: oskarputraa on 23 August 2019, 8:47 pm EST

  • Posted 23 August 2019, 8:47 pm EST - Updated 3 October 2022, 7:32 pm EST

    Hi,

    I would like to customize column’s name for new column I create with column function (Add New Column) instead of generated default by system “col1”.

    Could you help me with that ? Thanks.

    Oskar Putra

  • Posted 23 August 2019, 9:05 pm EST

    I use FlexSheet

  • Posted 26 August 2019, 3:02 am EST

    Hi Oskar,

    You may handle the columnChanged event and change the header of the inserted column accordingly:

    onColumnChanged(s, e) {
    	if(e.added) {
    		s.columns[e.index].header = 'Column ' + e.index;
    	}
    }
    

    Please refer to the sample below:

    https://stackblitz.com/edit/angular-rhipws

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels