The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I am trapping the PasteCellText event of the GridGroupingControl and setting the value for each cell in the source datatable in the event handler.
I have a problem when I paste into multiple cells of a column on which the grid has been sorted. The order of values pasted is not preserved. As the values get pasted one by one, the grid moves the modified rows up or down according to the sorting criteria. Because of this the subsequent data gets pasted into wrong cells.
Is there a way to avoid this problem?
Thanks,
Sameer
ADAdministrator Syncfusion Team April 5, 2005 03:01 PM UTC
One thing you can do is to cache the target records in their original order in ClipboardPaste. Then in PasteCellText, instaed of working on the records from the grid, retrieve them from the cached records, and set the values on thoses records. This way, the paste will occur as if the grid were fixed for the entire paste operation, and then was sorted after completion of the entire paste.
Here is a miinimal sample showing what I mean.
http://www.syncfusion.com/Support/user/uploads/GGC_BookMark_2a3ce2d5.zip
SPSameer PatilApril 7, 2005 10:20 AM UTC
Worked fine. Thanks a lot!
Sameer
>Hi,
> I am trapping the PasteCellText event of the GridGroupingControl and setting the value for each cell in the source datatable in the event handler.
> I have a problem when I paste into multiple cells of a column on which the grid has been sorted. The order of values pasted is not preserved. As the values get pasted one by one, the grid moves the modified rows up or down according to the sorting criteria. Because of this the subsequent data gets pasted into wrong cells.
> Is there a way to avoid this problem?
>
>Thanks,
>Sameer