title: Angular DevExtreme Datagrid : how to get values of a row
body: <p>i have this datagrid , <strong>here is my template</strong> : </p>
  
  <p></p>
  
  <pre><code>    &lt;dxo-paging [enabled]="true"&gt;&lt;/dxo-paging&gt;
      &lt;dxo-editing
        mode="row"
        [allowUpdating]="true"
        [allowDeleting]="true"
        [allowAdding]="true"&gt;
      &lt;/dxo-editing&gt;
  
      &lt;dxi-column dataField="Cuid" caption="Cuid" [width]="130"&gt;&lt;/dxi-column&gt;
      &lt;dxi-column dataField="Nom" caption="Nom"&gt;&lt;/dxi-column&gt;
      &lt;dxi-column dataField="Prenom" caption="Prenom"&gt;&lt;/dxi-column&gt;
      &lt;dxi-column
        dataField="EdoID"
        caption="Edo"
        [width]="125"
        [setCellValue]="preSelectEdo"&gt;
        &lt;dxo-lookup
          [dataSource]="edos"
          displayExpr="Code"
          valueExpr="ID"&gt;
        &lt;/dxo-lookup&gt;
      &lt;/dxi-column&gt;
  
      &lt;dxi-column
        dataField="ShopID"
        caption="Boutique"
        [width]="125"
        [setCellValue]="preSelectShop"&gt;
        &lt;dxo-lookup
          [dataSource]="shops"
          displayExpr="Name"
          valueExpr="ID"&gt;
        &lt;/dxo-lookup&gt;
      &lt;/dxi-column&gt;
    &lt;/dx-data-grid&gt;
  </code></pre>
  
  <p>and I want to, get a reference to my datagrid and get a row value within a click button:</p>
  
  <p>in my <strong>component.ts</strong>, I've tried this :</p>
  
  <pre><code>export class myComp {
  constructor(){}
    @ViewChild(DxDataGridComponent) dataGrid: DxDataGridComponent;
  
    getValueCell(rowIndex, datafield) {
      this.dataGrid.instance.cellValue(rowIndex, datafield);
    }
  
    onClickBtn(){
      result = this.getValueCell(1,'Name');
      console.log(result);
    }
  }
  </code></pre>
  
  <p>as you can see, when clicking: I got a result <strong>'undefined'</strong>; it seems like I haven't got the right reference to the <strong>datagrid</strong></p>
  
  <p><strong>Suggestions ?</strong></p>