Title: Angular - DataGridComponent selectRow method not working Post by: Swany on December 28, 2018, 11:49:42 AM Please see topic for more information: https://www.jeasyui.com/forum/index.php?topic=7760.0 (https://www.jeasyui.com/forum/index.php?topic=7760.0)
If I have a virtualScroll set to true for a DataGridComponent and call selectRow it does not work. I have the idField value set and I bind the 'selection' to the datagrid. I load a grid with data. I scroll half way down the grid. I edit the row by passing the row to a dialog. I save the save data and call service to get the data and reload the grid. The grid selects row but does not scroll to the selected row. Title: Re: Angular - DataGridComponent selectRow method not working Post by: stworthy on December 29, 2018, 12:30:33 AM It isn't a good idea to load a large data after edit and save a row. So please set the 'lazy' to true to turn on the lazy mode.
Code: <eui-datagrid #dg style="height:250px" After saving the row, reload only this row and update to the dataset. Code: const index = this.data.indexOf(this.selection); If you really want to use un-lazy mode, update the specified row and then refresh the virtual scroll view. Code: if (this.selection){ |