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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Pasting text seems to bypass some events

Thread ID:





16058 Jul 5,2004 02:05 PM UTC Jul 5,2004 02:26 PM UTC WinForms 2
Tags: GridControl
Asked On July 5, 2004 02:05 PM UTC

Hi. I''m having trouble detecting that the user has changed a GDBG cell''s text, if they do it by pasting (as plain text). I''m using, and pasting via Shift+Ins, as using Ctrl+V seems to not paste at all. 1) Grid_RowEditing doesn''t fire, but I can work around that by explicitly calling the handler from my Model_PasteCellText handler. 2) CurrentCellValidating never fires. When I try to call THAT explicitly, my handler only sees the old text, not the freshly-pasted text. For this, I haven''t found a workaround. What do you suggest? Thanks, Tom

Administrator [Syncfusion]
Replied On July 5, 2004 02:23 PM UTC

To validate pasting cell by cell in a GridDataBoundGrid, you can use the grid.Model.PasteCellText event.

Replied On July 5, 2004 02:26 PM UTC

Ah wait, I figured out a workaround... In my PasteCellText handler, I just set e.Style.Text = e.Text; to accept the pasted text as the new cell contents, then proceed with the two workarounds I described above. This time, my explicitly-called Grid_CurrentCellValidating gets the new text as intended. Thanks, Tom


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon