title: Dojo Datagrid - Get the row number
body: <p>I am trying to retrieve the line number in dojo data grid. rowIndex function would not help me much because I need the 'line number' and NOT 'row number' when sorted. </p>
  
  <p>The scenario:</p>
  
  <p>I would like to set the focus on one specific row and this focus should remain even after sorting. But if I use the code below, it does not select the correct row. </p>
  
  <p>For example, the index 1 is on the 5th line after sorting. However, the e.item.id still remains as 1, expected is 5. </p>
  
  <pre><code>calendar.on("itemClick", function (e) 
  { 
      MyGrid.doclick({ rowIndex: e.item.id }); 
      MyGrid.scrollToRow(e.item.id); 
  });
  </code></pre>
  
  <p>Additionally, I also tried...</p>
  
  <pre><code>calendar.on("itemClick", function (e)
  {
      var identity = MyGrid._by_idx[e.item.id].idty;
  
      var gridItem = MyGrid.getItem(identity);
      var gridItemIndex = MyGrid.getItemIndex(gridItem);
  
      MyGrid.doclick({ rowIndex: gridItemIndex });
      MyGrid.scrollToRow(e.item.id);
  });
  </code></pre>
  
  <p>Could you please let me know how to get the correct row after fitering? I thank you for your time. </p>
  
  <p>Wishes, 
  Santosh </p>