Checkbox rowheader in Wijmogrid to select/unselect rows

Posted by: vilaspatil321 on 4 February 2019, 2:44 am EST

    • Post Options:
    • Link

    Posted 4 February 2019, 2:44 am EST

    I have created a checkbox rowheader column and I want it to select/unselect individual rows.

    <wj-flex-grid …>

    <ng-template wjFlexGridCellTemplate [cellType]=“‘TopLeft’”>





    <ng-template wjFlexGridCellTemplate [cellType]=“‘RowHeader’” let-cell=“cell”>



    I can see checkbox rowheader column and I can select/unselect it. However as I scroll the grid up and down the selection changes randomly. For example, if I have checked checkbox in 5th row, as I scroll down I find checkbox number 27 and 62 in checked state. Also, as I scroll up again, instead of checkbox number 5, checkbox 2 is checked. This is a very weird behavior. Please help me sort it out.

    I am using angular 5.

  • Posted 5 February 2019, 1:27 am EST

    Hi,

    Please refer to this sample where this works. Please let me know if this works for you.

    http://jsfiddle.net/45huko0e/

  • Posted 5 February 2019, 10:23 am EST

    Hi,

    Thanks for your reply. The answer involves a lot of JS code. As I am using Angular 5, I want to do it in angular way with property bindings, components, etc. Is there any angular way of achieving this?

    Thanks!

  • Posted 6 February 2019, 3:33 am EST

    Hello Vilas,

    Please refer to the following demo sample created using Angular.

    https://stackblitz.com/edit/angular-qyrxun?file=app/app.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