Hello!
I have a DataTable object, and it binded to xamDataGrid component with this code:
xamDataGrid1.DataSource = MainTable.DefaultView;
When I remove some rows from MainTable, it remains visible in xamDataGrid1, but without any data - just empty lines. When I scroll to their, I can see large lags. Maybe I should call some invalidate method for xamDataGrid1? What is his name?
Thanks for helping and sorry for my bad english.
I had the same issue and while quite a few years later my solution may help others.
In my case I was add/removing from the DataTable/View from a different thread, this casued the events to be raised and handled in a non-UI thread and thus the XamDataGrid errored when handling them.
Then when scrolling the XamDataGrid threw exceptions in the background that it couldn't find the rows that had been deleted causing the grid scroll to lag.
The solution was to make all changes to the DataTable/View from the UI thread using Dispatcher.Invoke
Hi,
I see, this works for all datasources, even though your other approach should be fine too.
I am really glad to hear you got this resolved. Please mark the thread as such so it helps other users as well.
Best regards Petar.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Hello.
Now I use xamDataGrid delete selected rows command, so problem is solved. Thanks for reply :)
Hello,
I have been looking into your issue and tried to reproduce it to no avail. When using the DataTable.Rows’ Remove or RemoveAt methods the XamDataGrid decreases its records count removing the appropriate one instantly. I was wondering if you could attach an isolated sample reproducing this behavior, which I can look into and probably resolve.
Thanks in advance. Looking forward to hearing from you.