473,516 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Designer -> 'Collection' type property -> refresh control after adding new items

Hi All :)

I've created an UserControl, which has a couple of properties that are
collections (generic lists of some objects). It would be nice, if
control refreshed each time I add a new item to the collection (using
StringCollectionEditor). Is there any attribute I can use, or perhaps I
have to create a new class that inherites from List<Tand subscribe on
some event? Any suggestions greatly appreciated.

Greetings
jumper

Jan 10 '07 #1
1 1991
What do you meen by refreshing the control? When adding/removing elements to
the collection using string collection editor should fire
ComponentChanging/ComponentChanged events through the
ICompoenentChangedService. You can subscirbe for these notifications in your
designer and use them to update your control.
--
Stoitcho Goutsev (100)

<12******@wp.plwrote in message
news:11********************@o58g2000hsb.googlegrou ps.com...
Hi All :)

I've created an UserControl, which has a couple of properties that are
collections (generic lists of some objects). It would be nice, if
control refreshed each time I add a new item to the collection (using
StringCollectionEditor). Is there any attribute I can use, or perhaps I
have to create a new class that inherites from List<Tand subscribe on
some event? Any suggestions greatly appreciated.

Greetings
jumper

Jan 10 '07 #2

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

Similar topics

2
2643
by: Sean Carey | last post by:
I converted a C# Upload app to VB.NET and am down to one error and was hoping someone could help me with te error. I would greatly appreciate help from anyone. Here is the error: c:\inetpub\wwwroot\admin\filemanager.aspx.vb(76): Expression is of type 'System.Web.UI.HtmlControls.HtmlInputFile', which is not a collection type.
3
6718
by: Marty McFly | last post by:
Hello, I have a control class that inherits from System.Web.UI.WebControls.Button. When I drag this control from the "My User Controls" tab in the toolbox onto the form, I want it to reflect the following default properties: Height = 32px, Width = 144px. I declare the Width property in my control as... \\\
0
970
by: Saimeera | last post by:
Hi, I am creating a custom control in asp.net 2.0. I want to add items in the collection property when i set the value for a property name 'code' during design mode. I can able to add items in the collections property. But problem is that when i switch to HTMLview, The items are once again added in the collection property.(atlast same...
3
1459
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.
3
1664
by: Alvaro E. Gonzalez V. | last post by:
Hi; I'm doing a UserControl and add a ArrayList type property. But this property is not set correctly in design time from Designer. What is the better way to do it? Thanks Alvaro.
2
2946
by: JB | last post by:
I have existing aspx pages that I'm editing in VS 2005 that I add a server control to - like a label. I include the runat="server" and it doesn't seem to create the reference in the code behind for it. Is there any way to have it automatically generate the code behind? Also - when I look in the .aspx.designer.cs file, there are lots of...
7
57519
by: Andrew Robinson | last post by:
I have a method that needs to return either a Dictionary<k,vor a List<v> depending on input parameters and options to the method. 1. Is there any way to convert from a dictionary to a list without itterating through the entire collection and building up a list? 2. is there a common base class, collection or interface that can contain...
5
3824
by: David Longnecker | last post by:
I'm working to create a base framework for our organization for web and client-side applications. The framework interfaces with several of our systems and provides the business and data layer connectivity for basic operations and such. I've ran into a snag that I just can't think myself out of. Here's an example: I have an object for a...
0
1413
by: Steve K. | last post by:
I understand the concepts and rules for invoking UI methods from a non-UI thread. In the past I have always checked with the control's InvokeRequired property and Invoked my delegate accordingly. This has worked fine, nothing special. BUT, I am now working on my first client/server app and I have a slightly new challenge that I'm not...
0
7182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7142
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...
0
7548
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5110
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...
0
4773
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...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
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
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
488
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...

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.