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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

validation of excel grid paste into syncfusion grid

Thread ID:





97553 Dec 8,2010 10:54 PM UTC Dec 9,2010 10:54 AM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Gav Newalkar
Asked On December 8, 2010 10:54 PM UTC


How do I validate the range of cells being pasted into a syncfusion grid?

Basically, I have an application with a grid that's 10 columns long. I want to make sure that when a user pastes contents from Excel, the application can validate to ensure that the pasted contents are a grid of 10 columns.

I know that I can use:
this.gridGroupingControl1.TableModel.ClipboardPaste += new GridCutPasteEventHandler(TableModel_ClipboardPaste);

But within the actual TableModel_ClipboardPaste(...) method I only know of how to retrieve the clipboard contents as a string. is there a neater way?

Yuvaraja V [Syncfusion]
Replied On December 9, 2010 10:54 AM UTC

Hi Gav,

Thanks for using syncfusion products.

The default behavior for a gridControl is to paste what is on the clipboard and append rows and columns if neccessary.To avoid you would use the "ClipboardFlags" property.It prevents the appending of rows and columns.The following code illustrates the same.

e.ClipboardFlags = GridDragDropFlags.NoAppendCols;
e.ClipboardFlags = GridDragDropFlags.NoAppendRows;

Let us know if you have any other concerns.

Yuvaraja V.


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

or the page will be automatically redirected to 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