Remove row with header text in FlexSheet

Posted by: holly.anderson on 26 September 2017, 12:40 pm EST

  • Posted 26 September 2017, 12:40 pm EST

    Hello,

    I have a FlexSheet control which contains a bound sheet driven by Knockout. By default, the column headers (A, B, C, …) are at the top of the sheet, and the first row contains the column header text. I know it’s possible to remove the column headers and configure the first row to be the column headers by supporting filtering, sorting, etc. I’d like to know if it’s possible to keep the column headers and remove the first row. I don’t want there to be a row which contains information that is not actual data. Ideally, I’d also like to replace the text in the column headers with the descriptive text. The attached image may provide additional clarification if my description was unclear.

    Thanks,

    Holly

  • Posted 27 September 2017, 5:00 am EST

    Hi Holly,

    You need to handle updatedView event for FlexSheet to replace text in column headers and hide the first row.

    We recommend you to hide first row since removing of first row will affect some default functionality such as column selection on header click.

    Please refer to the fiddle that implements the same:

    http://jsfiddle.net/mkgupta911/h4nozk7e/14/

    Thanks,

    Manish Kumar Gupta

  • Posted 27 September 2017, 3:55 pm EST

    Hi Manish,

    Thanks for the help. Is there any way to remove/hide the column headers in the first row but have row 1 remain and contain actual data? The fiddle you provided implements almost exactly what I want, but I’d prefer for the data to start in row 1. Is this possible? And in either case, is there some way to hide the first row without it flickering?

    I tried replacing the row header text similar to how you replaced the column header text in the fiddle. The problem is that when I double click in a cell to edit it, the row header text reverts to its original value. Updated fiddle: http://jsfiddle.net/h4nozk7e/15/

    Thanks,

    Holly

  • Posted 29 September 2017, 2:29 am EST

    Hi Holly,

    This issue requires further investigation. Hence, this issue has been escalated to the concerned team for further investigation with tracking id 289393.

    We will let you know as soon as we get any update on this.

    Thanks,

    Manish Kumar Gupta

  • Posted 2 October 2017, 3:39 pm EST

    Hi Manish,

    Which issue has been escalated? Hiding the first row and having the row numbers start at 1, or hiding the first row without the flicker? If only one has been escalated, do you have a suggestion for the other?

    Thanks,

    Holly

  • Posted 4 October 2017, 5:17 am EST

    Hi Holly,

    We are sorry for the late reply.

    Both issues have been escalated and the issue is with the team for investigation. We will let you know as soon as we get any update on this issue.

    Thanks,

    Manish Kumar Gupta

  • Posted 13 October 2017, 12:41 pm EST

    If anyone else runs into the problem with the first row flickering, hiding the row in the updatingView event (instead of updatedView) solved the issue for me.

  • Posted 6 January 2018, 7:57 am EST

    HI Holly,

    We can remove the header row of bound sheet in the ‘initialized’ event handler of FlexSheet.

    The code snippet is as following:

    $scope.initialized = function(flexSheet){
    
    ...
    
        if (flexSheet.rows[0] instanceof wijmo.grid.sheet.HeaderRow){
    
            flexSheet.rows.removeAt(0);
    
        }
    
    ...
    
    }
    

    Please feel free to check.

    http://jsfiddle.net/mkgupta911/h4nozk7e/

    ~Manish

  • Posted 11 January 2018, 11:36 am EST

    Hi Manish,

    Is the initialized event handler something that’s only available with Angular? I’m having some trouble trying to figure out how to do this with a FlexSheet that’s bound with Knockout.

    Thanks,

    Holly

  • Posted 17 January 2018, 8:23 am EST

    Is there any update on this?

Need extra support?

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

Learn More

Forum Channels