title: how to get selected rows values in angular infragistics grid UI
body: <p>I'm using angular Infragisics grid in angular typescript 12 and I want to display all the selected rows from the igx-grid when I click a button.</p>
  <p>Here is what I tried but I get an empty array and no data is displayed.</p>
  <p>Here is the HTML code</p>
  <pre><code>&lt;igx-grid 
  
  #grid id=&quot;grid&quot; [rowSelection] ='&quot;multiple&quot;'  primaryKey=&quot;prID&quot; rowHeight=&quot;35px&quot; displayDensity=&quot;compact&quot; [data]=&quot;listeproduits&quot;  [autoGenerate]=&quot;false&quot; height=&quot;380px&quot; [allowFiltering]=&quot;true&quot; &gt;
  
   &lt;igx-column  field=&quot;code&quot;  header=&quot;Code&quot;&gt;&lt;/igx-column&gt;
   &lt;igx-column  field=&quot;name&quot;   header=&quot;name&quot;&gt;&lt;/igx-column&gt;
  
   &lt;/igx-grid&gt;
  
  </code></pre>
  <p>and here is where I try to print the selected value</p>
  <pre><code>
  export class productComponnet implements OnInit {
  
    @ViewChild(&quot;grid&quot;) public grid!: IgxGridComponent;
  
  selected_rows()
    {
      console.log(this.grid.selectedRows);
    }
  }
  
  </code></pre>