Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Number of row in grid from rowId
posted

Hi,
   if I have Id of row from dataSource.dataView() or dataSource.allTransactions() can I somehow get which row is it in $("#myGrid").igGrid("rows")?

  • 2355
    Verified Answer
    Offline posted

    Hi Jan,

    Thank you for posting in our forums! If the primaryKey option is set every row of the grid will have data-id attribute which value is the primary key’s value of the corresponding record in the data source. So you can use this attribute to locate the row you want. It looks like this : $("#myGrid").igGrid("rows").index($(“#myGrid tr[data-id=’” + dataId + ”’]”)) .

    I hope this helps! Please don’t hesitate to write again if you have any further questions.

    Kind regards,
    Petko Zhekov
    Software Engineer