Hi,
first of all I want to tell all and IG guys that this control xamGrid is very nice thing.
Lately I am playing with copy and paste functionality to build a prototype for an app for our traders. It works and for relatively small data sets it has pretty good performance. However, my main requirement for the Silverlight app is to have an ability to copy and paste large amounts of data - can be tens of thousands of rows on a hundred or so columns. I am playing with data set of 65K records with 100 columns. Pasting data into the empty grid is fast - about 4-5 seconds. Can paste set of cells or rows into the populated grid, paste columns using PasteData IG extension method. Copy is working as well, however copying large number of rows is very slow or even suffocates my computer.
I tried to improve speed with attempting to use multithreading, but can't do this because can access data only from grid's cells which are on UI thread. If there would be an access to internal itemsource (if there is such) which reflects current sorting, it could be possible to break process on threads.
So, I have a few questions to IG guys or to anybody able to help:
1. Is there such thing as data source with reflects current sorting? Other than xamGrid.ItemSource which holds initial data source.
2. Is there any way to make copy or paste of large data set faster. Particularly, paste multiple columns or rows to the grid with data, copy multiple columns or rows (up to all) from the grid.
Any help is appreciated. I guess it might help other people too.
Thank you.
Victor
I'm researching this for you and will post back here as soon as I have more information.
I loaded SR and have tried copy/paste - really don't see any difference.
However, I tried to use data object behind the grid and it works for me very well. Of cource, it is limited functionality, but copy and paste of rows, columns and multiple cells fragments are working very fast.
I am using this:
List
<object> rowData = rowCollection.ToList().Select(r => r.Data).ToList();
and then cast object to my type:
foreach
(var row in rowData){var loan = row as Loan; ...
and then either set property of my loan to the value from Clipboard or getting value from the loan property to Clipboard.
So far it is the best solution for me because it work very fast. I hope it will open door for Silverlight development after showing to our users.