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

Allowing new lines in DataBoundGrid Paste

Thread ID:

Created:

Updated:

Platform:

Replies:

6533 Aug 15,2003 12:47 PM UTC Aug 15,2003 12:54 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 15, 2003 12:47 PM UTC

Hi, I have a data bound grid. I would like the user to paste any text into the TextBox cell. This text may contain new line characters. How do I allow that? thanks, - Reddy

Administrator [Syncfusion]
Replied On August 15, 2003 12:54 PM UTC

Nevermind. I got it to work by using the DBG Model ClipboardPaste event. I was looking for that event in the grid. For regular Grid Control it was there in the Grid. For DBG, it is there in the model. thanks, - Reddy ----------------------------------- private void queryDBGModel_ClipboardPaste(object sender, GridCutPasteEventArgs e) { GridCurrentCell cc = queryDBG.CurrentCell; int row = cc.RowIndex; int col = cc.ColIndex; IDataObject iData = Clipboard.GetDataObject(); string str = iData.GetData(DataFormats.Text) as string; if(queryDBG[row, col].CellType == "TextBox") { cc.Renderer.Paste(); } e.Handled = true; }

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

;