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. Image for the cookie policy date

Is there any Clone() method available?

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.

3 Replies

AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon