473,513 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 21 '05 #1
2 1696
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

Jul 21 '05 #2
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

Jul 21 '05 #3

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

Similar topics

3
3034
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...
0
867
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...
2
347
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...
7
2802
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
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
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
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.