AD
Administrator
Syncfusion Team
March 2, 2007 05:49 PM UTC
Hi Chris,
One way to handle this is in your PasteCellText event handler, you can check if the cell being past in is one you want to paste or not. If not, return e.Cancel = True. You could do this by checking the row & col, or by checking a e.Style property like e.Style.ReadOnly for example.
this.gridControl1.Model.CutPaste.ClipboardFlags &= ~GridDragDropFlags.Styles;
this.gridControl1.Model.PasteCellText += new GridPasteCellTextEventHandler(Model_PasteCellText);
void Model_PasteCellText(object sender, GridPasteCellTextEventArgs e)
{
if( e.Text != "SomeValue")
{
Console.WriteLine(e.RowIndex + ":::" + e.ColIndex);
e.Cancel = true;
}
}
Best regards,
Haneef