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.

Text Box copy and paste issue with HTML code value GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

54108 Dec 30,2006 11:26 AM Jan 4,2007 01:35 AM Windows Forms 3
loading
Tags: GridControl
Patrick Rumery
Asked On December 30, 2006 11:26 AM

I copy from a text cell that contains html code and paste into another text cell, several rows below the cell I paste into are getting some of the html code. It looks like the extra cells are where there are page breaks in the html code and the grid is treating the page breaks like tab delimitation. I need the grid to paste one to one and not one to many. What are my options?

after copy and paste into first row.zip

Administrator [Syncfusion]
Replied On January 3, 2007 04:59 AM

Hi Prumery,

By default, the grid interprets newlines from the clipboard as information to be added in a new row. So, it will not paste text with newlines in it into a single cell. If you want this behavior, then you will have to handle the entire paste yourself. You can do this by catch the grid.Model.ClipboardPaste event. But grid doesn't interprets HTML-PageBreak

from the clipboard. Here is a minimal sample works fine with HTML-PageBreak.

Sample : GDBGCopy.zip
a>

Best Regards,
Haneef

Patrick Rumery
Replied On January 3, 2007 03:21 PM

Thanks for the reply Haneef. I'm using VB and a grid data bound grid version 4.302.0.30. I'm looking for the event of grid.model.ClipboardPaste and I don't see it. I tried to add a handel for the event and there is no clipboard or cut/paste event in the list. Is there a VB example of copy from Excel into the GDBG you can send me?


>Hi Prumery,

By default, the grid interprets newlines from the clipboard as information to be added in a new row. So, it will not paste text with newlines in it into a single cell. If you want this behavior, then you will have to handle the entire paste yourself. You can do this by catch the grid.Model.ClipboardPaste event. But grid doesn't interprets HTML-PageBreak

from the clipboard. Here is a minimal sample works fine with HTML-PageBreak.

Sample : GDBGCopy.zip
a>

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On January 4, 2007 01:35 AM

Hi Prumery,

Use the AddHandler to subscribe the Model.ClipboardPaste event. Here is a code snippet to show this.

'Form Load....
AddHandler Me.gridControl1.Model.ClipboardPaste, AddressOf Model_ClipBoardPaste

Private Sub Model_ClipBoardPaste(ByVal sender As Object, ByVal e As GridCutPasteEventArgs)
'Your code Here.....
End Sub

>>>>>>Is there a VB example of copy from Excel into the GDBG you can send me?

In the Sample you will find customized excel import, to get a dataTable from the excel file and thereby the dataSource of GridDataBoundGrid is set.. Let me know if your requirement is misunderstood.

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.

;