473,395 Members | 1,393 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,395 software developers and data experts.

inherit DataColumnCollection

Hi all,

I have a strong typed dataset. The client may do something like
my_dataset.my_table.Columns.Add(column)
I want to capture this event. So I try to derive a class from
DataColumnCollection. But it fails to compile saying that "no overload for
method 'DataColumnCollection 'takes '0' arguments. Then I found that
DataColumnCollection class does not have public constructor.
So is it possible to derive DataColumnCollection? Or how can I capture the
function call Columns.Add?

Thanks a lot.
Frank
Nov 19 '05 #1
2 2172
The DataColumnsCollection has a CollectionChanged event that captures the
Action (Add, Remove etc)

Stephen

"Frank" <fr*******@yahoo.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Hi all,

I have a strong typed dataset. The client may do something like
my_dataset.my_table.Columns.Add(column)
I want to capture this event. So I try to derive a class from
DataColumnCollection. But it fails to compile saying that "no overload for
method 'DataColumnCollection 'takes '0' arguments. Then I found that
DataColumnCollection class does not have public constructor.
So is it possible to derive DataColumnCollection? Or how can I capture the
function call Columns.Add?

Thanks a lot.
Frank

Nov 19 '05 #2
Thanks for your help. What I want is to do something before Columns.Add
operation. That's why I want to derive DataColumnCollection class. Then I
can override Add method.

inside my derived class
Add()
{
doSomething()
base.Add()
}

Thanks.
Frank
"Stephen Muecke" <st*****@senet.com.au> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
The DataColumnsCollection has a CollectionChanged event that captures the
Action (Add, Remove etc)

Stephen

"Frank" <fr*******@yahoo.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Hi all,

I have a strong typed dataset. The client may do something like
my_dataset.my_table.Columns.Add(column)
I want to capture this event. So I try to derive a class from
DataColumnCollection. But it fails to compile saying that "no overload for method 'DataColumnCollection 'takes '0' arguments. Then I found that
DataColumnCollection class does not have public constructor.
So is it possible to derive DataColumnCollection? Or how can I capture the function call Columns.Add?

Thanks a lot.
Frank


Nov 19 '05 #3

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

Similar topics

7
by: Fabian Neumann | last post by:
Hi! I got a problem with font-family inheritance. Let's say I have CSS definitions like: p { font:normal 10pt Verdana; } strong { font:normal 14pt inherit;
1
by: Jeff Schmidt | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, ~ Ok, I've got some tables, and a style sheet that contains stuff to format the table. The problem I'm having is, it appears that using...
0
by: Frank | last post by:
Hi all, I have a strong typed dataset. The client may do something like my_dataset.my_table.Columns.Add(column_name) I want to capture this event. So I try to derive a class from...
4
by: Slavyan | last post by:
(I just started to learn C#.NET) What's the syntax in c# for a class to inherit more than one class. I know following syntax: public class MyClass : MyOtherClass { } but I need to inherit...
6
by: Mohammad-Reza | last post by:
I wrote a component using class library wizard. In my component i want to in order to RightToLeft property do some works. I can find out if user set this property to Yes or No, But if He/She set it...
0
by: Frank | last post by:
Hi all, I have a strong typed dataset. The client may do something like my_dataset.my_table.Columns.Add(column_name) I want to capture this event. So I try to derive a class from...
1
by: daniel | last post by:
i wirte a "class b" to inherit DataColumnCollection, but it show a error message that is 'method of DataColumnCollection is not anyone overloadding to use zero of argument' The following it is...
0
by: Roman | last post by:
I have a DataColumnCollection with data columns of different data types: string, date, boolean... Is there a way to create another DataColumnCollection which contains only boolean data columns? ...
2
by: GTalbot | last post by:
Hello fellow comp.infosystems.www.authoring.stylesheets colleagues, Imagine this situation: #grand-parent-abs-pos { height: 400px; position: absolute; width: 600px; }
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.