Angular 2 wjFlexGridDetail directive: Always show details

Posted by: richard.mccluskey on 18 July 2018, 5:42 am EST

  • Posted 18 July 2018, 5:42 am EST

    Is it possible to always show row details without the need to click a button?

    Using Angular 2 with the wjFlexGridDetail directive. It all works fine with the default click to show functionality, but I would like the details to always show.

  • Posted 18 July 2018, 9:06 pm EST

    Hi,

    To show a detail row without the button click you may call showDetail() method provided by FlexGridDetailProvider.

    Please refer to following code snippet:-

    //Expand all detail rows in the start
     
    initDetailProvider(dp:wjcGridDetail.FlexGridDetailProvider){
     
     
    //get all rows
     
     
    var rows=dp.grid.rows.map(row=>row);
    //for each row, expand detail row
     
     
    rows.forEach(row=>{
     
     
    dp.showDetail(row,false);
     
     
    });
     
     
    }
    
    

    You may also refer to the following sample which implements the same:-

    https://stackblitz.com/edit/angular-6mbx8h?file=src%2Fapp%2Fapp.component.ts

    ~Manish

Need extra support?

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

Learn More

Forum Channels