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.

copy a cell with formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

57052 Feb 24,2007 11:11 AM Feb 26,2007 12:22 PM Windows Forms 1
loading
Tags: GridControl
Christian Staffe
Asked On February 24, 2007 11:11 AM

How to copy a complete cell wih its formatting ? Here is my use case: Let's suppose I have a dropdown in row 3, col 4. I need to insert a line in row 3 -> my dropdown will move down 1 row but I would like to move it again to row 3 where it was before the line insertion. What's the "right" way to do this ?

Administrator [Syncfusion]
Replied On February 26, 2007 12:22 PM

Hi Christian,

You can turn on the Styles flag in the ClipboardFlags property.

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

and use the below code snippet to copy and insert the simillar row at 3rd position.

this.gridControl1.Model.Selections.Clear();
this.gridControl1.Model.Selections.Add(GridRangeInfo.Row(3));
this.gridControl1.Model.Rows.InsertRange(4,1);
this.gridControl1.Model.CutPaste.Copy();
this.gridControl1.Model.Selections.Clear();
this.gridControl1.Model.Selections.Add(GridRangeInfo.Row(4));
this.gridControl1.Model.CutPaste.Paste();

Sample : GC_AutoSize.zip

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.

;