473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

clone a datagrid

Is it possible to clone a datagrid?

I've created a datagrid on my aspx page, editing various attributes,
adding columns, etc. I would like to, in code, create an arbitrary
number of these datagrids. Any ideas?

I thought that perhaps I should createa a separate "web user control".
I added my datagrid to this control, I compiled, then I dragged the
control to my aspx page. The control did not render in the designer.

The reason I would prefer to clone, or at the very least, have the
control render nicely, is that I would like a non-programmer to be
able to go in and tweak the gui a little. This approach has worked so
far on the project.

Thanks for any help,
Felix
Nov 18 '05 #1
3 3024
Felix,

If the DataGrid class is not Cloneable (does not contain Clone() method) you
can allways inherite from datagrid, let say, MyDataGrid that implements
ICloneable interface (and implement public object Clone() ) that will return
the cloned datagrid.
this method has to do a shallow/deep cloning - as you choose.

Picho
"Felix" <fe*************************@yahoo.com> wrote in message
news:80**************************@posting.google.c om...
Is it possible to clone a datagrid?

I've created a datagrid on my aspx page, editing various attributes,
adding columns, etc. I would like to, in code, create an arbitrary
number of these datagrids. Any ideas?

I thought that perhaps I should createa a separate "web user control".
I added my datagrid to this control, I compiled, then I dragged the
control to my aspx page. The control did not render in the designer.

The reason I would prefer to clone, or at the very least, have the
control render nicely, is that I would like a non-programmer to be
able to go in and tweak the gui a little. This approach has worked so
far on the project.

Thanks for any help,
Felix

Nov 18 '05 #2
Felix,

If the DataGrid class is not Cloneable (does not contain Clone() method) you
can allways inherite from datagrid, let say, MyDataGrid that implements
ICloneable interface (and implement public object Clone() ) that will return
the cloned datagrid.
this method has to do a shallow/deep cloning - as you choose.

Picho
"Felix" <fe*************************@yahoo.com> wrote in message
news:80**************************@posting.google.c om...
Is it possible to clone a datagrid?

I've created a datagrid on my aspx page, editing various attributes,
adding columns, etc. I would like to, in code, create an arbitrary
number of these datagrids. Any ideas?

I thought that perhaps I should createa a separate "web user control".
I added my datagrid to this control, I compiled, then I dragged the
control to my aspx page. The control did not render in the designer.

The reason I would prefer to clone, or at the very least, have the
control render nicely, is that I would like a non-programmer to be
able to go in and tweak the gui a little. This approach has worked so
far on the project.

Thanks for any help,
Felix

Nov 18 '05 #3
Thanks for the suggestion, but I believe that implementing the Clone()
method would not be trivial. How do I easily copy all the attributes
and columns, etc?

Thanks,
Felix

"Picho" <pi***********@telhai.ac.il> wrote in message news:<uj**************@TK2MSFTNGP11.phx.gbl>...
Felix,

If the DataGrid class is not Cloneable (does not contain Clone() method) you
can allways inherite from datagrid, let say, MyDataGrid that implements
ICloneable interface (and implement public object Clone() ) that will return
the cloned datagrid.
this method has to do a shallow/deep cloning - as you choose.

Picho
"Felix" <fe*************************@yahoo.com> wrote in message
news:80**************************@posting.google.c om...
Is it possible to clone a datagrid?

I've created a datagrid on my aspx page, editing various attributes,
adding columns, etc. I would like to, in code, create an arbitrary
number of these datagrids. Any ideas?

I thought that perhaps I should createa a separate "web user control".
I added my datagrid to this control, I compiled, then I dragged the
control to my aspx page. The control did not render in the designer.

The reason I would prefer to clone, or at the very least, have the
control render nicely, is that I would like a non-programmer to be
able to go in and tweak the gui a little. This approach has worked so
far on the project.

Thanks for any help,
Felix

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason Evans | last post by:
Hi All, I am writing my own implementation of queue via a linked list, note not a LinkedList, and was running into trouble with the clone method. I was wondering if anyone could point out some...
2
by: Felix | last post by:
Is it possible to clone a datagrid? I've created a datagrid on my aspx page, editing various attributes, adding columns, etc. I would like to, in code, create an arbitrary number of these...
6
by: Amil Hanish | last post by:
I have two classes that I have implemented ICloneable. From my top-level class, how to I clone the base class values: See "how do I clone the base class values" below. Since Clone returns an...
6
by: Steve | last post by:
I can't find a straight answer on what to use? I need a deep copy, so I implemented IConeable and the Clone() method. However, I'm not sure I did it correct. Is it suposed to be an allocation of...
4
by: Brian Keating | last post by:
Hi there, Consider this from MSDN *Notes to Inheritors When you derive from DataGridViewCheckBoxCell and add new properties to the derived class, be sure to override the Clone method to copy the...
1
by: Alex D. | last post by:
hi guys. I need to clone multiple times an object and I am succesfully cloning using the regular serialization process, using a MemoryStream. My problem is that after cloning the object more that...
2
by: Steven | last post by:
Hi, I have created my own node (class MyNode : TreeNode) for a TreeView. To populate the treeview, i use something like MyNode newNode = new MyNode("Bla bla bla","0","1") for example. But, to...
16
by: Hamed | last post by:
Hello I am developing a utility to be reused in other programs. It I have an object of type Control (a TextBox, ComboBox, etc.) that other programmers use it in applications. they may set some...
14
by: Hamed | last post by:
Hello It seems that I should implement ICloneable to implement my own clone object. the critical point for me is to make a control object based on another control object that all of its event...
7
by: =?Utf-8?B?Sm9lbCBNZXJr?= | last post by:
I have created a custom class with both value type members and reference type members. I then have another custom class which inherits from a generic list of my first class. This custom listneeds...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.