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

Copy/Paste negative number

Thread ID:





11917 Mar 18,2004 02:54 AM UTC Mar 18,2004 11:13 AM UTC WinForms 1
Tags: GridControl
Asked On March 18, 2004 02:54 AM UTC

I have a cell with value -100, celltype is double, the cell''s format is "0.00;(0.00)", so the cell display 100. If I copy the cell to another cell, the target cell display 100, celltype is string, and cell format is "". Can I copy the whole gridstyleinfo to another cell? Thanks.

Administrator [Syncfusion]
Replied On March 18, 2004 11:13 AM UTC

If you are copying from one GridControl to another GridControl, the default behavior is to copy the style. But if you are using a GridDataBoundGrid, then it normally only copies text. The reason is that cells in a GridDataBoundGrid ''inherit'' the style properties (than the cell text) from the GridBoundColumn.StyleInfo for that column. Individual cells to not save style properties. One way you can handle this is to subscribe to the ClipboardCopy event, and handle all the work yourself. You can place whatever you want on the clipboard, and that could be pasted later. If you look at this forum thread, http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9906, it has code to use clipboardcopy. Now you would not want to skip the hidden columns (maybe, ???), and instead of using the GridData object (that only applies to GridControl), you would index the GridDataBoundGrid and retrieve its formattedtext property. s += this.gridDataBoundGrid[row, col].FormattedText;


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

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