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.

GridControl - skip a cell while pasting

Thread ID:

Created:

Updated:

Platform:

Replies:

99369 May 17,2011 12:31 AM May 24,2011 06:31 AM Windows Forms 2
loading
Tags: GridControl
Dhivya
Asked On May 17, 2011 12:31 AM

Hi,
I am using gridControl for one my projects - I have a set of columns of which some of them are readonly. When the user selects a whole row , copies the row and tries to paste into another empty row, all the data must be pasted onto the new row except the readonly cells. In short, while pasting the whole row, how can we skip pasting to readonly cells ?

Thanks for your help,
-DK


Dhivya
Replied On May 17, 2011 02:29 PM

Hi,

Can anyone help with this please ?

Thanks,
Dhivya


Rajadurai C [Syncfusion]
Replied On May 24, 2011 06:31 AM

Hi Dhivya,

Thanks for your interest in Syncfusion Products.

We regret for the delay caused in getting back to you.

To prevent the pasting for readonly cells, you can handle the PasteCellText event as below:

// Event Invoker
this.gridControl1.PasteCellText += new GridPasteCellTextEventHandler(gridControl1_PasteCellText);

// Method Invoked
void gridControl1_PasteCellText(object sender, GridPasteCellTextEventArgs e)
{
if (e.Style.ReadOnly)
e.Cancel = true;
}


Regards,
Rajadurai


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.

;