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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copied Contents

Thread ID:

Created:

Updated:

Platform:

Replies:

18290 Aug 27,2004 08:45 AM UTC Aug 27,2004 10:25 AM UTC WinForms 3
loading
Tags: GridControl
arvind
Asked On August 27, 2004 08:45 AM UTC

Hai , I am using GDBD and have a context menu attached to it,which has the properties of Copu and Paste. The code I am using for coping is: this.gridDataBoundGrid1.Model.CutPaste.Copy(); Bofore copying the contents to another cell I want to check the contents of wht are copied and the do the paste .the code I am using is : this.gridDataBoundGrid1.Model.CutPaste.Paste();

Administrator [Syncfusion]
Replied On August 27, 2004 08:53 AM UTC

Is your question, How do I get the information on the clipboard? If so, try
DataObject data = (DataObject) Clipboard.GetDataObject();
if(data.GetDataPresent(DataFormats.Text))
{
	string s = (string)data.GetData(DataFormats.Text);
        //s holds the string on the clipboard
}

arvind
Replied On August 27, 2004 09:16 AM UTC

Hai , I want to check if the copied value is integer or not .That is basically my requirement >Is your question, How do I get the information on the clipboard? > >If so, try >
>DataObject data = (DataObject) Clipboard.GetDataObject();
>if(data.GetDataPresent(DataFormats.Text))
>{
>	string s = (string)data.GetData(DataFormats.Text);
>        //s holds the string on the clipboard
>}
>

Administrator [Syncfusion]
Replied On August 27, 2004 10:25 AM UTC

In the code above, check if the string s holds an integer in some way. You could loop through the characters in s checking each character, or use int.Parse in a try-catch block, or you could use double.TryParse. double d; if(double.TryParse(s, System.Globalization.NumberStyles.Integer, null, out d) { // s holds an integer and d is the value }

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.

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

;