Closed vitoulet closed 10 years ago
Hi @vitoulet,
thanks for trying out bwu_datagrid and for your feedback.
Did you use a release from pub.dartlang.org or the current master branch? The branch 04_model already contains a lot of fixes which I'll merge with master soon.
I'll try it out anyway and try to make it work.
Thanks! Günter
Yes, I used the release from pub.dartlang.org (release 0.0.5).
I can try once the branch is merged and published on pub.dartlang.org.
Thanks. Stéphane
I have merged the branch but I try to fix a few issues (including yours) before I publish the next release.
I pulled your changes and it seems to work now. I'll re-test and close the issue once it is published.
Thanks!
I had done a mistake in my code. I had to invalidate all the rows in order to clear the _rowCache.
void addnewRowHandler(DataRow dataRow) {
var item = MapDataItemAdaptor.convert(dataRow);
grid.invalidateAllRows();
data.items.insert(0, item);
grid.updateRowCount();
grid.render();
}
I believe that it's not a big deal but it's something that could be improved.
Anyway, thanks. I am closing this issue.
Hi Stéphane,
thanks a lot for the feedback!
Günter
When using a DataProvider backed by a List (like MapDataItemProvider), the rendering of the grid does not reflect the data in the DataProvider.
If the new row is inserted at the beginning of the list several times, the grid will duplicate the last line (from the DataProvider) multiple times.
When I load my grid: I have one row already available:
I add a new row ("NEW ROW 1"):
I add a new row again ("NEW ROW 2"):
My previous "new row" got removed and the last row is duplicated.
Here is the code that I use to refresh the rendering of the grid (based on one of your examples):
Thanks! P.S. Great work by the way.