Adding new rows to the grid -
i initialise ag-grid like:
<ag-grid-ng2 [rowdata]="records"></ag-grid-ng2>
after adding new items records array, rows in ag-grid remain not updeted. have call setrowdata(records). slow , ag-grid loses state (like focused cell).
is there way have rows in ag-grid refreshed during changing data in rowdata
.
no, there no other way. grid expects rowdata immutable, means have replace array [rowdata] property picked up. way around this, do, call api.setrowdata() method, forces grid treat rowdata new set of data.
Comments
Post a Comment