Click here to Skip to main content
15,888,062 members
Home / Discussions / C#
   

C#

 
Questionhow to use a list array to populate a listbox with columns Pin
robertkjr3d26-Mar-09 7:31
robertkjr3d26-Mar-09 7:31 
AnswerRe: how to use a list array to populate a listbox with columns Pin
dan!sh 26-Mar-09 7:44
professional dan!sh 26-Mar-09 7:44 
GeneralRe: how to use a list array to populate a listbox with columns Pin
robertkjr3d26-Mar-09 7:57
robertkjr3d26-Mar-09 7:57 
GeneralRe: how to use a list array to populate a listbox with columns Pin
dan!sh 26-Mar-09 8:15
professional dan!sh 26-Mar-09 8:15 
GeneralRe: how to use a list array to populate a listbox with columns Pin
robertkjr3d26-Mar-09 8:25
robertkjr3d26-Mar-09 8:25 
GeneralRe: how to use a list array to populate a listbox with columns Pin
Fayu26-Mar-09 8:39
Fayu26-Mar-09 8:39 
GeneralRe: how to use a list array to populate a listbox with columns Pin
dan!sh 26-Mar-09 8:48
professional dan!sh 26-Mar-09 8:48 
AnswerRe: how to use a list array to populate a listbox with columns Pin
Fayu26-Mar-09 8:00
Fayu26-Mar-09 8:00 
Set the DataTextFiled property of lbNames to the name of the property you want to display.
Example:

public class Customer
{
     public string Name
     {
      ...
     }
     public long Id
     {
      ...
     }
}

//You can use List instead of array.  Couldnt get the < to work so i made it into array
Customer[] customers;

this.lbNames.DataSource = customers;
this.lbNames.DataTextField = "Name";
this.lbNames.DataValueField = "Id";

GeneralRe: how to use a list array to populate a listbox with columns Pin
robertkjr3d26-Mar-09 8:08
robertkjr3d26-Mar-09 8:08 
GeneralRe: how to use a list array to populate a listbox with columns Pin
Fayu26-Mar-09 8:37
Fayu26-Mar-09 8:37 
GeneralRe: how to use a list array to populate a listbox with columns Pin
robertkjr3d26-Mar-09 8:43
robertkjr3d26-Mar-09 8:43 
GeneralRe: how to use a list array to populate a listbox with columns Pin
Henry Minute26-Mar-09 10:39
Henry Minute26-Mar-09 10:39 
QuestionEmbed a progress bar inside a treeview node Pin
JamieNS26-Mar-09 7:30
JamieNS26-Mar-09 7:30 
AnswerRe: Embed a progress bar inside a treeview node Pin
dan!sh 26-Mar-09 7:55
professional dan!sh 26-Mar-09 7:55 
QuestionArgument Exception appears in some computers but not in others Pin
VitroBlue26-Mar-09 7:15
VitroBlue26-Mar-09 7:15 
AnswerRe: Argument Exception appears in some computers but not in others Pin
Luc Pattyn26-Mar-09 8:44
sitebuilderLuc Pattyn26-Mar-09 8:44 
QuestionSend data to USB ? Pin
Mohammad Dayyan26-Mar-09 7:00
Mohammad Dayyan26-Mar-09 7:00 
AnswerRe: Send data to USB ? Pin
Giorgi Dalakishvili26-Mar-09 7:31
mentorGiorgi Dalakishvili26-Mar-09 7:31 
AnswerRe: Send data to USB ? Pin
Luc Pattyn26-Mar-09 7:31
sitebuilderLuc Pattyn26-Mar-09 7:31 
GeneralRe: Send data to USB ? Pin
Mohammad Dayyan26-Mar-09 7:56
Mohammad Dayyan26-Mar-09 7:56 
GeneralRe: Send data to USB ? Pin
Luc Pattyn26-Mar-09 8:04
sitebuilderLuc Pattyn26-Mar-09 8:04 
AnswerRe: Send data to USB ? Pin
Yusuf26-Mar-09 7:46
Yusuf26-Mar-09 7:46 
QuestionLINQ results flatten Pin
ywang55526-Mar-09 6:57
ywang55526-Mar-09 6:57 
AnswerRe: LINQ results flatten Pin
Henry Minute26-Mar-09 10:42
Henry Minute26-Mar-09 10:42 
QuestionPossible to run postback-code before Page_load-code? Pin
sa}{en26-Mar-09 6:10
sa}{en26-Mar-09 6:10 

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.