Click here to Skip to main content
15,904,822 members
Home / Discussions / C#
   

C#

 
AnswerRe: windows login with own application..... Pin
DoctorMick1-Jul-09 6:05
DoctorMick1-Jul-09 6:05 
GeneralRe: windows login with own application..... Pin
S K Y1-Jul-09 8:19
S K Y1-Jul-09 8:19 
GeneralRe: windows login with own application..... Pin
Dave Kreskowiak1-Jul-09 8:55
mveDave Kreskowiak1-Jul-09 8:55 
GeneralRe: windows login with own application..... Pin
Christian Graus1-Jul-09 12:36
protectorChristian Graus1-Jul-09 12:36 
AnswerRe: windows login with own application..... Pin
0x3c01-Jul-09 6:12
0x3c01-Jul-09 6:12 
GeneralRe: windows login with own application..... Pin
S K Y1-Jul-09 8:24
S K Y1-Jul-09 8:24 
AnswerRe: windows login with own application..... Pin
Ravi Bhavnani1-Jul-09 6:45
professionalRavi Bhavnani1-Jul-09 6:45 
AnswerRe: windows login with own application..... Pin
Christian Graus1-Jul-09 12:37
protectorChristian Graus1-Jul-09 12:37 
QuestionListview control alternative Pin
travis marble1-Jul-09 5:43
travis marble1-Jul-09 5:43 
AnswerRe: Listview control alternative Pin
dan!sh 1-Jul-09 7:55
professional dan!sh 1-Jul-09 7:55 
GeneralRe: Listview control alternative Pin
travis marble1-Jul-09 8:01
travis marble1-Jul-09 8:01 
GeneralRe: Listview control alternative Pin
I Believe In GOD1-Jul-09 10:52
I Believe In GOD1-Jul-09 10:52 
GeneralRe: Listview control alternative Pin
travis marble1-Jul-09 11:29
travis marble1-Jul-09 11:29 
GeneralRe: Listview control alternative Pin
travis marble2-Jul-09 12:09
travis marble2-Jul-09 12:09 
QuestionCannot use BufferManager Pin
tiran_kaskas1-Jul-09 5:21
tiran_kaskas1-Jul-09 5:21 
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 

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.