473,799 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Collection property does not update control

Hi,

I have a collection property in my custom control like this one :

[Category("Behav ior")]
[Browsable(true)]
[Description("Co lumn Collection")]
[DesignerSeriali zationVisibilit y(DesignerSeria lizationVisibil ity.Content)]
[Editor(typeof(C olumnCollection Editor),typeof( System.Drawing. Design.UITypeEd itor))]
public ColumnCollectio n Columns
{
get
{
if (this.m_columns == null)
{
this.m_columns = new ColumnCollectio n(this);
}
return this.m_columns;
}
}

it works very well, except one thing.

When the number of columns increase or decrease, it should redraw/update
the control, but nothing occurs.
I have to click somewhere on the form to update the control.

I tried to use eventhandlers, but where to use them when there is not
"set" in this property ?

I tried to add them in my ColumnCollectio n class where is the method to
add column and into the method to remove a column, but nothing worked.

Any ideas ?

thx.

Al.
Feb 18 '07 #1
1 1563
nobody has an idea ?

--== Alain ==-- wrote:
Hi,

I have a collection property in my custom control like this one :

[Category("Behav ior")]
[Browsable(true)]
[Description("Co lumn Collection")]
[DesignerSeriali zationVisibilit y(DesignerSeria lizationVisibil ity.Content)]
[Editor(typeof(C olumnCollection Editor),typeof( System.Drawing. Design.UITypeEd itor))]

public ColumnCollectio n Columns
{
get
{
if (this.m_columns == null)
{
this.m_columns = new ColumnCollectio n(this);
}
return this.m_columns;
}
}

it works very well, except one thing.

When the number of columns increase or decrease, it should redraw/update
the control, but nothing occurs.
I have to click somewhere on the form to update the control.

I tried to use eventhandlers, but where to use them when there is not
"set" in this property ?

I tried to add them in my ColumnCollectio n class where is the method to
add column and into the method to remove a column, but nothing worked.

Any ideas ?

thx.

Al.
Feb 19 '07 #2

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

Similar topics

2
2766
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx. The problem is the article is in VisualBasic. I already get the collection to be recognized as a Data Source by the IDE. It populated the DataGrid correctly from the fields on the items object of the collection, but I can't get the DataGrid to...
5
2735
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use the appointment collection to populate the calendar control. The performance getting the XML data is fine, but loading the data into the collection is slow. My question/problem is should I be using the collection, a dataset, or something else to...
7
6260
by: Mark Denardo | last post by:
Hi I have a TabControl object that I need to insert new TabPages into. To append them to the end of the Controls Collection I can do: tc.controls.add(tp) (tc - tabcontrol object) (tp - tabpage object) But how can I insert them into the middle of collection? I see a 'RemoveAt' method that takes an index to remove at a specific location, how come
2
3185
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of the source code in a compressed file that you are free to download...
6
1674
by: rodchar | last post by:
hey all, Dim _oItems As Outlook.Items Dim oInbox As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) _oItems = oInbox.Items I can iterate thru this with a for-each loop however i cannot bind directly to datagrid. Any ideas why not? or how i can get this in a datagrid.
4
2542
by: Michael | last post by:
Dear all .. If I want to use develop a user control and declare a public property which the type is System.Windows.Forms.GridTableStylesCollection For example : Public Class LookAndView Inherits System.Windows.Forms.UserControl Private _Collection As GridTableStylesCollection
19
4922
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the exception of custom Collection Classes. Background: I'm developing an A2K .mdb to be deployed as an .mde at my current job-site. It has several custom controls which utilize custom classes to wrap built-in controls, and add additional functionality....
6
7226
by: Arthur Dent | last post by:
How do you sort a generic collection derived from System.Collections.ObjectModel.Collection? Thanks in advance, - Arthur Dent
3
1472
by: --== Alain ==-- | last post by:
Hi, I have a control which has a collection property. when an item of the collection property will be added, removed, and so on, i would like to refresh the control itself. Usually for that i use eventhandler in the set method of the property. But as the collection property has only a get method, i'm not able to do it so.
0
9689
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10248
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7573
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
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 we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.