How can I programmatically interact with outline column?

Posted by: tim.guglielmo on 11 December 2019, 12:55 pm EST

    • Post Options:
    • Link

    Posted 11 December 2019, 12:55 pm EST

    I really like the new outline column feature. However, it seems that it is missing some features. Or at least, I’m not seeing this in the documentation.

    I’d like to know if it is possible to expand and collapse groups from js. Also I’d like to be able to tell whether or not a row is a leaf in the tree or not.

  • Posted 11 December 2019, 2:43 pm EST

    I’d also like to know how to tell if the checkbox in the outline column cell is checked.

  • Posted 12 December 2019, 1:15 am EST

    Hi Tim,

    You may achieve the required functionality by using the setCollapsed() and setCheckStatus() methods of outlineColumn. Please refer to the following code snippet and the sample demonstrating the same:

    // collapse
    sheet.outlineColumn.setCollapsed(rowIndex, true);
    // expand
    sheet.outlineColumn.setCollapsed(rowIndex, false);
    // get check box status
    var status = sheet.outlineColumn.getCheckStatus(rowIndex);
    

    https://codesandbox.io/s/spread-js-starter-k8w4s

    API reference:

    • outlineColumn: https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.OutlineColumn.OutlineColumn.html

    Regards

    Sharad

  • Posted 12 December 2019, 3:48 pm EST

    I see it now. Thank you.

Need extra support?

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

Learn More

Forum Channels