473,396 Members | 1,900 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.

Help Using CollectionBase OnSet and OnSetComplete

Hi

I have a class that inherits CollectionBase - now what I want is to be able
to validate data when it is updated in the List (I need to make sure that
certain values are not duplicates) so I thought I could override the OnSet
and OnSetComplete functions but they never seem to get called.

Note though that the data is being populated in a PropertyGrid using the
Collection Editor UITypeEditor...

Whats the best way of going about using the OnSet and OnSetComplete
functions...

Thanks
Graeme

Aug 7 '08 #1
1 1255
Hi

I have worked out that it is the PropertyGrid and CollectionEditor causing
the problem so I'm looking into that now

Thanks
Graeme

"graeme gorman" <graeme[remove_this].go****@gmail.comwrote in message
news:7B**********************************@microsof t.com...
Hi

I have a class that inherits CollectionBase - now what I want is to be
able to validate data when it is updated in the List (I need to make sure
that certain values are not duplicates) so I thought I could override the
OnSet and OnSetComplete functions but they never seem to get called.

Note though that the data is being populated in a PropertyGrid using the
Collection Editor UITypeEditor...

Whats the best way of going about using the OnSet and OnSetComplete
functions...

Thanks
Graeme
Aug 7 '08 #2

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

Similar topics

5
by: Steve M | last post by:
I have subclassed CollectionBase. I have also implemented GetEnumerator(). I have tried to set the DataSource of a DataGrid to an instance of my subclass. However, the items in the grid are not...
0
by: Shannon Richards | last post by:
Hello All: Can anyone tell what exactly this method is supposed to be used for? I have a class that derives from CollectionBase. This class overrides the OnSetComplete() method to raise an event...
1
by: alanrn | last post by:
I've implemented a number of strongly-typed collections that inherit from CollectionBase and recently noticed something that I don't fully understand. CollectionBase defines method RemoveAt(). ...
1
by: hromberg | last post by:
I have a set of passthrough queries that rely on a temporary table in SQL and currently I am dealing with this by creating a passthrough that builds the table and leaves the connection open for an...
1
by: Kyle Novak | last post by:
I have a question about strongly typed objects when looping through a collection based on the CollectionBase object and using a For..Each loop. I have 2 objects: -Invoice: Holds all properties...
3
by: Shannon Richards | last post by:
Can anyone tell me what the CollectionBase.OnSetComplete() overridable method is supposed to be used for? MyCollectionClass(Index) = Object triggers this method but why does "setting" in a...
4
by: Tarun Mistry | last post by:
Hi all, I have posted this in both the c# and asp.net groups as it applies to both (apologies if it breaks some group rules). I am making a web app in asp.net using c#. This is the first fully OO...
8
by: julia_beresford | last post by:
Hi I need to create the following class at runtime: public class MyCollection : CollectionBase { public void Add(MyItem item) { List.Add(item); }
3
by: Tony | last post by:
Hello! I just wonder in .NET 2.0 Generics was added. Before generics existed it was an advantage to get strongly typed methods so we derived collection classes from CollectionBase where we had...
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: 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...
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
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
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.