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.

Paste

Thread ID:

Created:

Updated:

Platform:

Replies:

15786 Jun 28,2004 06:36 AM Jun 28,2004 10:20 AM Windows Forms 9
loading
Tags: GridControl
Francis Ouellet
Asked On June 28, 2004 06:36 AM

I want to validate paste in my grid. If a user paste text that is not correct in a cell, I want to cancel the paste. Wich event and how to cancel or undo the paste?

Administrator [Syncfusion]
Replied On June 28, 2004 07:48 AM

Is this the same issue from http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=15720? I think you should be able to use PasteCellText to manage this. Below is a sample. Is the problem you are having occurring when you try to paste a sinle value into a single actively editing cell. If so, the grid does not handle the paste in this situation, the cell control does. To do dynamic validation at this level will require handling an event on the cell control. It is probably doable, but will take some effort. The sample below just by passes this problem by by calling CurrentCell.EndEdit when you do a paste. PasteValidation_2879.zip

Administrator [Syncfusion]
Replied On June 28, 2004 08:00 AM

Yes, but PasteCellText never fire!!!!! I paste text in one on many cell but the event PsteCellText is not raised! >Is this the same issue from http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=15720? > >I think you should be able to use PasteCellText to manage this. Below is a sample. > >Is the problem you are having occurring when you try to paste a sinle value into a single actively editing cell. If so, the grid does not handle the paste in this situation, the cell control does. To do dynamic validation at this level will require handling an event on the cell control. It is probably doable, but will take some effort. The sample below just by passes this problem by by calling CurrentCell.EndEdit when you do a paste. > >PasteValidation_2879.zip > >

Administrator [Syncfusion]
Replied On June 28, 2004 08:03 AM

Does it fire for you in the sample I attached? If it does not, what version of our code are you using? Can you attach a project that shows the problem?

Francis Ouellet
Replied On June 28, 2004 08:25 AM

I get this error when I try to open PasteValidation.sln : The application for project c:\temps\PasteValidation.sln is not installed. Make sure the application for the project type .csproj is installed.

Administrator [Syncfusion]
Replied On June 28, 2004 08:35 AM

If you look in the zip file, you will see the proj file. There is also a VB project file. Are you trying to open the solution file directly from the zip. If so, this may not work as the projects are 2002 projects. Try opening Vis Stu, and use File | Open | Project and try opening the project file directly (not the solution). If you are using 2003, then you should get a prompt to convert the project.

Francis Ouellet
Replied On June 28, 2004 08:42 AM

I always get the same error. But I can open then project and convert it. The PasteCellText event is raised and work fine. But for my application the event is not raised. Maybe because my form is an mdi child?

Administrator [Syncfusion]
Replied On June 28, 2004 08:53 AM

I suspect the problem is not related to MDI stuff. Here is a little sample where the event fires OK for me (al long as you are not trying to paste a single string into an actively editing cell). MDI_8371.zip Can you post a sample that shows the problem?

Francis Ouellet
Replied On June 28, 2004 09:49 AM

Wich version are you using? Me it''s 1.6.1.0

Administrator [Syncfusion]
Replied On June 28, 2004 10:20 AM

I am using the 2.0 code base. You should at least upgrade to 1.6.1.8 if you want to use 1.6 code. You can do so from your Direct Trac home page. To run the MDIsample on earlier code, just try commenting out any lines that give syntax errors (usually, there are 2 or 3 in in the Designer generated code).

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.

;