Posted 3 April 2023, 7:03 pm EST
I want to set each row’s row header manually according to my need . How can i do that ?
Forums Home / Wijmo / General Discussion
Posted by: syed.mahmud on 3 April 2023, 7:03 pm EST
Posted 3 April 2023, 7:03 pm EST
I want to set each row’s row header manually according to my need . How can i do that ?
Posted 4 April 2023, 3:48 pm EST
Hi,
FlexSheet’s row headers are set to ‘1,2,3…’ by default, as this is the expected behavior. In order to change the default row headers, you’ll have to handle the ‘formatItem’ event of the flexSheet and specify the new row headers value as per your requirements, like this -
// add custom row header values
flexSheet.formatItem.addHandler((s,e) => {
if(e.panel == s.rowHeaders) {
e.cell.innerText = 'Header ' + e.row;
}
})
Regards