I have one grid where I am adding files to a document storage system. After the files are added, I go to a second grid which displays the documents available for further processing. I would like the documents just added to be selected and at the top of the grid page.
Thanks,
Ted Herrlich
Hello,
I have been looking into your question and prepared a small sample with an igx-grid and a button which adds a selected record at the top of the grid on click.
In order to achieve this behavior once the record is added through the grid's addRow method I'm moving it to the top as follows:
const lastRec = this.data.pop(); const targetIndex = 0; this.data.splice(targetIndex, 0, lastRec);
Then you could select the row by its primary key via the grid's selectRow method.
My sample for your reference could be found here. Please test it on your side and let me know if I may be of any further assistance.
Sincerely,Teodosia HristodorovaSoftware Developer