We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Problem with paste in a sorted GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

27021 Apr 5,2005 07:36 AM Apr 7,2005 06:20 AM Windows Forms 2
loading
Tags: Grouping
Sameer Patil
Asked On April 5, 2005 07:36 AM

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

Administrator [Syncfusion]
Replied On April 5, 2005 11:01 AM

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

Sameer Patil
Replied On April 7, 2005 06:20 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;