Hi,
I would like to get the row number for igGird. Please see the image attached. Please let me know how to get the value.
Thanks
Ravi
Hi Ravi, to get the row number in an igGrid, you can use the built-in API functions like ui.owner.element.index() or retrieve it through the row selector feature depending on your grid setup. For example, if you’re handling a row click event, you can access the row index using ui.rowIndex to get the exact row number dynamically. It works similarly to how tools like insta reels viewer let you navigate through content rows efficiently — you can easily pinpoint and extract the specific row data you need without affecting the rest of the grid.
ui.owner.element.index()
ui.rowIndex
Hi, to get the row number in an igGrid, you can use the built-in APIs like ui.row.index inside the row selection or click event, or alternatively call $("#gridID").igGrid("selectedRows") to fetch the row index programmatically; this ensures you can easily identify the position of the row regardless of sorting or filtering applied, similar to how you would track reference IDs in other data tables—if you’re dealing with practical implementations like mold removal tracking systems, you may also want to log row numbers for audits Check the website for details to make sure all records are aligned correctly.
ui.row.index
$("#gridID").igGrid("selectedRows")
Hello Ravi,
After investigating this further, I have determined that your requirement could be achieved by accessing the first cell of the selected row, which is the rowSelector. This could be achieved as follows:
rowSelectionChanged: function (evt, ui) {
let rowSelectorNumber = parseInt(ui.row.element[0].cells[0].textContent);
console.log(rowSelectorNumber);
}
Please test it on your side and let me know if you need any further information regarding this matter.
Regards, Monika Kirkova, Infragistics
I need the RowNumber value. If I am on to next page and rownumber is 25. I want that number to displayed on the UI.
Hello Indra,
I have been looking into your question and have determined that if the rowSelector’s number of the clicked row should be accessed, what I could suggest is binding a method to the rowSelectionChnaged event and checking the index of the currently clicked row:
{
name: "Selection",
let rowSelectorNumber = ui.row.index + 1;
console.log(rowSelectorNumber)
Additionally, if the value of a cell for specific row should be accessed the getCellValue method could be used.
Please let me know if you need any further information regarding this matter.