Hello, why pasting from MS Excel of 50000 rows containing only single string value takes much time? When I do the same from one Excel instance to another there is no significant UI freeze. Are there any options to improve the performance?
The problem was fixed in service release versions 2014.1, 2013.2, 2013.1. It took 12s to add 50000 pasted rows before the fix and about 5s after the fix.
Hi,
I am stuck with the same issue, did you find any solution?Thanks
Femke
Hi Lukasz,
That makes perfect sense. Since this is the case, I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 173386. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
In order to track this, I have created a private case for Vital. The case number is CAS-138267-W4B1M2 and he can view it here https://ko.infragistics.com/my-account/support-activity while logged into his account.
Rob,
First of all - thank you for your investigation and "workaround" attached.
(I'm Vitals colleage from work btw).
The issue descibed here is, I think, I little bit more gentle.
In our application, user is using XamDataGrid with variety of features:
selecting, copy, paste, manual edit, sorting, grouping, filtering (with custom filters), using fixed columns and more.
One of the key-functions is - off course - copy & paste functionality.
Imagine that Paste operation can be done when having arbitrary selection and/or columns/rows visibility (because of the features I've listed).
This is the reason why we wanted to fully trust XamDataGrid paste functionality - as we don't know what is the view of the Grid at given moment.
(if we had to manually paste into the grid, we would have to take into account all those features, like i.e:
- is the column visible now (field chooser functionality),
- is the row is visible now (filtering)
- what is the column order
- what is the rows order (sort functionality)
and so on.
When we use XamDataGrid build-in paste functionality, all those concerns go out of the window.
Thats why we have this issue with pasting onto special "new record".
Don't you think this is an Infragistics bug after all and worth open development issue ?
Hello Vital,
Thank you for the sample. I was able to reproduce the loading time issue with it. I think in this case though you might be better off manually adding the records to the underlying data collection directly rather than having the grid do it. Doing this manually I am able to cut the load time down to a few seconds. The XamDataGrid probably has a few things it needs to do during a pasting event which contributes to the load time you are seeing.
Since you are selecting the row placeholder, we can use this to determine when the pasted content needs to be treated as new records. When the XamDataGrid's ClipboardPasting event is fired, you can determine if the selected row is the row placeholder by using the ActiveRecord property. If "(xamDataGrid1.ActiveRecord as DataRecord).IsAddRecord" is equal to true then you can cancel the event with e.Cancel and then add the records yourself directly to the underlying data source.
I have attached an updated version of your sample which uses this approach. You will see that the load time is cut down significantly to just a couple of seconds.