If you paste the data to Excel then use Text to Columns, after the text has been converted to columns if you copy it and paste special using the Transpose function it’ll convert to a list rather than columns.
In addition to @TomAlexander 's excellent suggestion of a BAQ, if there is a predefined number of items, one can also use User Codes.
The method I’d suggest depends on what exactly you’re trying to do. Personally, the only time I’ve ever bound a data source in code is when I want to use a ListPickerPanel, mostly because E10 doesn’t let you deploy such a control from the GUI based tools.
User Codes offer the ability to separate the displayed string from the value associated with it. So the user could select “Joe Bloggs” and the value would be “jbloggs@gmail.com”. You bind the values to the dropdown via a BAQ that selects user codes with a certain code type.
Beware of using this for any column that appears in an editable EpiGrid, especially where users may paste insert. You’d have to train users to input or paste the values that they never see. My attempts to attach code to the grid to perform the conversion have failed.
You can use an array as the data source.
If they need to multi-select, use a grid. If not, you could just use a drop down.
And I agree that if this list is ever going to change, it’s worth the investment to pull it from User Code or BAQ.
string emails = "bob@cats.com;jane@dogs.com;billie@rabbits.com";
string[] emailArray = emails.Split(';');
EpiForm form = new EpiForm(){...};
EpiUltraCombo combo = new EpiUltraCombo();
combo.DataSource = emailArray;
DataGridView grid = new DataGridView(){...};
grid.DataSource = emailArray;
form.Contols.Add(combo);
form.Controls.Add(grid);
form.Show();
I like this multi-select option so I think a grid would be best. I can’t do User codes as these emails are all different based upon who an order was sent to via email. There would be hundreds of thousands and not something we keep anywhere else but in this one field.
When I add this code to my customization I am getting a compile error. Did I do something wrong or do I need to replace the periods with something?
Sorry, the ellipses can be filled in with property definitions(size, location, …). You also just remove them but you will probably want to mess with size, location, dock style, …
Also, of course, you will need to handle the button clicks and such.
@josecgomez
Okay so back to this. I have the results showing in the message box properly. How do I get the results into a grid? It seems like it would be pretty simple?