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.

Clipboard Paste

Thread ID:

Created:

Updated:

Platform:

Replies:

57208 Feb 27,2007 02:22 PM Mar 1,2007 06:03 PM Windows Forms 3
loading
Tags: GridControl
Sathish Chandran
Asked On February 27, 2007 02:22 PM

Hi,

I pasted two columns in the grid and in the savecellinfo I'm trying to save the value in the document.

If I use
GridCurrentCell currentCell = CurrentCell;
m_document[e.RowIndex - 2, currentCell.ColIndex] = e.Style.CellValue;
the first column is overwritten by the second column.

if I use
m_document[e.RowIndex - 2, e.ColIndex] = e.Style.CellValue;

Rows count is incresing but the grid is empty.

Please help me out.

Thanks & Regards,
Sathish.

Administrator [Syncfusion]
Replied On February 27, 2007 05:44 PM

Hi Sathish,

There is a property flag that controls whether or not rows/columns can be appended during a paste.

[C#]
this.gridControl1.CutPaste.ClipboardFlags |= (GridDragDropFlags.NoAppendCols | GridDragDropFlags.NoAppendRows);

Best regards,
Haneef

Sathish Chandran
Replied On March 1, 2007 05:30 AM

Hi Haneef,

Thanks for your information.

I'm trying to paste two columns in the grid. When I paste, I'm getting e.colIndex as 0.
But when I edit the cell, I'm getting the exact e.ColIndex.
When I paste a value in the cell, I need to get the exact colIndex.

I'm doing this functionality in the savecellinfo.

Please help me out.
Thanks & Regards,
Sathish.

>Hi Sathish,

There is a property flag that controls whether or not rows/columns can be appended during a paste.

[C#]
this.gridControl1.CutPaste.ClipboardFlags |= (GridDragDropFlags.NoAppendCols | GridDragDropFlags.NoAppendRows);

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 1, 2007 06:03 PM

Hi Sathish,

To detect the cell information when pasting done in a cell, you need to handle the PasteCellText event of the grid and also you can turn off support for copying styles (allowing only text to be pasted and PasteCellText to be hit). To turn off style copy/paste support in a gridcontrol, turn off this flag.

this.gridControl1.Model.CutPaste.ClipboardFlags &= ~GridDragDropFlags.Styles;

this.gridControl1.Model.PasteCellText += new GridPasteCellTextEventHandler(Model_PasteCellText);
void Model_PasteCellText(object sender, GridPasteCellTextEventArgs e)
{
Console.WriteLine(e.RowIndex + ":::" + e.ColIndex);
}

Best regards,
Haneef

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.

;