FlexSheet selectionChanged nothing happened

Posted by: oskarputraa on 21 August 2019, 1:36 am EST

    • Post Options:
    • Link

    Posted 21 August 2019, 1:36 am EST

    Hi,

    refer to this https://www.grapecity.com/wijmo/demos/Grid/Selection/Overview/angular

    I would like to get selected row index and data, but nothing happened. I check my console, and it is clean, no log.

    This is my code

    onSelectionChanged(){
        console.log("Changed !!");
        console.log(this.formatSheet.selection);
      }
    
    <wj-flex-sheet #formatSheet 
      style="margin:0px;padding:0px;width: 100%; height:77%; border-radius:0px;">
      <wj-sheet [itemsSource]="source" name="{{sheetTitle}}" [rowCount]="20" [columnCount]="8" (selectionChanged)="onSelectionChanged()"></wj-sheet>
    </wj-flex-sheet>
    
  • Posted 21 August 2019, 2:30 am EST

    Hi Oskar,

    The selectionChanged event is raised by the WjFlexSheet component and not the WjSheet component. So, you will need to add the event handler to the element:

    <wj-flex-sheet #formatSheet 
      style="margin:0px;padding:0px;width: 100%; height:77%; border-radius:0px;"  (selectionChanged)="onSelectionChanged()">
      <wj-sheet [itemsSource]="source" name="{{sheetTitle}}" [rowCount]="20" [columnCount]="8"></wj-sheet>
    </wj-flex-sheet>
    

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels