Click here to Skip to main content
15,887,251 members
Home / Discussions / C#
   

C#

 
AnswerRe: Cannot use BufferManager Pin
Dave Kreskowiak1-Jul-09 8:52
mveDave Kreskowiak1-Jul-09 8:52 
Questionsave when a web server , site or a mail server is up or down Pin
Nafiseh Salmani1-Jul-09 5:06
Nafiseh Salmani1-Jul-09 5:06 
AnswerRe: save when a web server , site or a mail server is up or down Pin
Manas Bhardwaj1-Jul-09 5:11
professionalManas Bhardwaj1-Jul-09 5:11 
GeneralRe: save when a web server , site or a mail server is up or down Pin
Nafiseh Salmani1-Jul-09 5:21
Nafiseh Salmani1-Jul-09 5:21 
GeneralRe: save when a web server , site or a mail server is up or down Pin
Manas Bhardwaj1-Jul-09 5:23
professionalManas Bhardwaj1-Jul-09 5:23 
AnswerRe: save when a web server , site or a mail server is up or down Pin
Enver Maroshi1-Jul-09 6:50
Enver Maroshi1-Jul-09 6:50 
QuestionHow to create Unique Named Objects in a loop Pin
MarkB1231-Jul-09 4:59
MarkB1231-Jul-09 4:59 
AnswerRe: How to create Unique Named Objects in a loop Pin
Luc Pattyn1-Jul-09 5:13
sitebuilderLuc Pattyn1-Jul-09 5:13 
Hi,

In your code, you have the same name (ComboBoxName) for a string and for a RepositoryItemComboBox, which is unacceptable.

you are confusing two concepts:
1. each Control has a Name property, that is a string that is available at run-time, so you could find a Control "by name" just by iterating over tham all and recognizing the Name. Ir is primarily used by Visual Designer. If you don't use Designer, you may not need to assign a value to Name at all.
2. each Control may (or may not) have a reference stored in a variable, obviously a variable has a name. Controls don't need to have public variables refering to them, as soon as they are added to the Controls property of a Container (say a Form), they become part of that Container.

I will assume you are not really interested in the Name property, and want to hold references to a variable number of RepositoryItemComboBox objects. This would work for you then:

List< RepositoryItemComboBox> myRICBlist=new List< RepositoryItemComboBox>();
foreach (GridColumn col in view.VisibleColumns) {
      RepositoryItemComboBox comboBox = new RepositoryItemComboBox();
      myRICBlist.Add(comboBox);
}


and later on you could iterate all those comboboxes with:
foreach (RepositoryItemComboBox comboBox in myRICBlist) {
   comboBox.Clear();
}


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.

GeneralRe: How to create Unique Named Objects in a loop Pin
MarkB1231-Jul-09 7:01
MarkB1231-Jul-09 7:01 
GeneralRe: How to create Unique Named Objects in a loop Pin
Luc Pattyn1-Jul-09 8:04
sitebuilderLuc Pattyn1-Jul-09 8:04 
QuestionSend query to a search engine!! Pin
Nafiseh Salmani1-Jul-09 4:58
Nafiseh Salmani1-Jul-09 4:58 
AnswerRe: Send query to a search engine!! Pin
led mike1-Jul-09 5:46
led mike1-Jul-09 5:46 
GeneralRe: Send query to a search engine!! Pin
Nafiseh Salmani1-Jul-09 6:14
Nafiseh Salmani1-Jul-09 6:14 
GeneralRe: Send query to a search engine!! Pin
led mike1-Jul-09 6:31
led mike1-Jul-09 6:31 
QuestionThread of a delegate Pin
TheLaTouf1-Jul-09 3:43
TheLaTouf1-Jul-09 3:43 
AnswerRe: Thread of a delegate Pin
Ennis Ray Lynch, Jr.1-Jul-09 4:11
Ennis Ray Lynch, Jr.1-Jul-09 4:11 
AnswerRe: Thread of a delegate Pin
Nicholas Butler1-Jul-09 4:32
sitebuilderNicholas Butler1-Jul-09 4:32 
GeneralRe: Thread of a delegate Pin
TheLaTouf1-Jul-09 4:40
TheLaTouf1-Jul-09 4:40 
QuestionAutomatic download attachment from emails Pin
spankyleo1231-Jul-09 3:36
spankyleo1231-Jul-09 3:36 
AnswerRe: Automatic download attachment from emails Pin
c0ax_lx1-Jul-09 3:55
c0ax_lx1-Jul-09 3:55 
AnswerRe: Automatic download attachment from emails Pin
moon_stick1-Jul-09 5:09
moon_stick1-Jul-09 5:09 
GeneralRe: Automatic download attachment from emails Pin
spankyleo1231-Jul-09 8:57
spankyleo1231-Jul-09 8:57 
GeneralRe: Automatic download attachment from emails Pin
moon_stick1-Jul-09 9:18
moon_stick1-Jul-09 9:18 
GeneralRe: Automatic download attachment from emails Pin
moon_stick1-Jul-09 9:22
moon_stick1-Jul-09 9:22 
GeneralRe: Automatic download attachment from emails Pin
spankyleo1231-Jul-09 9:57
spankyleo1231-Jul-09 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.