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

Is there any Clone() method available?

Thread ID:

Created:

Updated:

Platform:

Replies:

21753 Nov 19,2004 07:38 AM UTC Nov 19,2004 12:30 PM UTC WinForms 3
loading
Tags: GridControl
jose acidrain
Asked On November 19, 2004 07:38 AM UTC

Hello! I´m using a 1.6 version of the Grid and I want to clone a DataBoundGrid object, but there´s no Clone() method available (Or maybe i can´t find it). Is there any method with the same functionality? Thanks in advance.

Administrator [Syncfusion]
Replied On November 19, 2004 08:53 AM UTC

There is no clone method for a GridDataBoundGrid. As far as the data the grid displays, you would either use the same datasource or clone the datasource and use it. There is a Clone method for the grid.GridBoundColumns object (or grid.Binder.InternalColumns if you did not add GridBounds). So you can use that to get a clone of the column information. Here is a thread that uses this clone in persisting column order and widths to a disk file. You could use something similar to create your own clone of these properties. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=3918

Administrator [Syncfusion]
Replied On November 19, 2004 11:03 AM UTC

We try to use this method but when we refill de datasource before clone the grid.GridBoundColumns the control don´t refresh any changes. We have to print a datasource keeping the column format, but we can´t reload the datasource in the control. So we need to make a clone, in memory, of the grid model, load the new datasource and print it. Thanks in advance. Rafael Gomez Hernando >There is no clone method for a GridDataBoundGrid. > >As far as the data the grid displays, you would either use the same datasource or clone the datasource and use it. > >There is a Clone method for the grid.GridBoundColumns object (or grid.Binder.InternalColumns if you did not add GridBounds). So you can use that to get a clone of the column information. Here is a thread that uses this clone in persisting column order and widths to a disk file. You could use something similar to create your own clone of these properties. >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=3918

Administrator [Syncfusion]
Replied On November 19, 2004 12:30 PM UTC

Here is a little sample showing how you might clone a GridDataBoundGrid in memory. (There may be other properties that you want to handle as well.) CloneGridDataBoundGrid_8898.zip

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

;