Click here to Skip to main content
15,908,841 members
Home / Discussions / C#
   

C#

 
QuestionHow to fill Combobox & ListBox in PopUp Windows Forms Pin
rzthebeginner13-Feb-07 23:44
rzthebeginner13-Feb-07 23:44 
AnswerRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
Ed.Poore14-Feb-07 0:31
Ed.Poore14-Feb-07 0:31 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
rzthebeginner14-Feb-07 0:41
rzthebeginner14-Feb-07 0:41 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
Ed.Poore14-Feb-07 0:47
Ed.Poore14-Feb-07 0:47 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms [modified] Pin
rzthebeginner14-Feb-07 0:53
rzthebeginner14-Feb-07 0:53 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
Ed.Poore14-Feb-07 1:14
Ed.Poore14-Feb-07 1:14 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
rzthebeginner14-Feb-07 1:20
rzthebeginner14-Feb-07 1:20 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
Ed.Poore14-Feb-07 2:55
Ed.Poore14-Feb-07 2:55 
One thing I noticed is for these two lines:
cmbCitizenship.SelectedValue = Convert.ToInt32(drRequest[0]["fldEmployeeCitizenship"].ToString());
cmbPAddrCountry.SelectedValue = Convert.ToInt32(drRequest[0]["fldEmployeePAddrCountryId"].ToString());
It'd be better as .SelectedValue = (int)(drRequest[0]["fieldname"]);  Because what your code is doing is converting an integer (stored in object form because of being late-bound) to a string and then back again, where as if you just cast it it'll be faster and happier.

The code looks correct, the only thing I can think of at the moment is how have the combo boxes been populated?  Are they bound to the data source?



GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
rzthebeginner14-Feb-07 21:04
rzthebeginner14-Feb-07 21:04 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
Ed.Poore15-Feb-07 0:20
Ed.Poore15-Feb-07 0:20 
GeneralRe: How to fill Combobox & ListBox in PopUp Windows Forms Pin
rzthebeginner15-Feb-07 1:10
rzthebeginner15-Feb-07 1:10 
Questiondatetime [modified] Pin
debnathrubs13-Feb-07 23:27
debnathrubs13-Feb-07 23:27 
AnswerRe: datetime [modified] Pin
dipswitch@ownage4u.nl13-Feb-07 23:35
professionaldipswitch@ownage4u.nl13-Feb-07 23:35 
AnswerRe: datetime Pin
dipswitch@ownage4u.nl14-Feb-07 0:11
professionaldipswitch@ownage4u.nl14-Feb-07 0:11 
QuestionExporting DataGrid contents to Excel Pin
Imthu13-Feb-07 23:27
Imthu13-Feb-07 23:27 
AnswerRe: Exporting DataGrid contents to Excel Pin
debnathrubs13-Feb-07 23:34
debnathrubs13-Feb-07 23:34 
Questionget ipaddress Pin
Nekshan13-Feb-07 22:53
Nekshan13-Feb-07 22:53 
AnswerRe: get ipaddress Pin
virendra patel13-Feb-07 22:58
virendra patel13-Feb-07 22:58 
GeneralRe: get ipaddress Pin
Nekshan13-Feb-07 23:03
Nekshan13-Feb-07 23:03 
GeneralRe: get ipaddress Pin
virendra patel13-Feb-07 23:48
virendra patel13-Feb-07 23:48 
AnswerRe: get ipaddress Pin
Blue_Boy13-Feb-07 23:20
Blue_Boy13-Feb-07 23:20 
QuestionUser Controls [modified] Pin
mark_w_13-Feb-07 22:50
mark_w_13-Feb-07 22:50 
AnswerRe: User Controls Pin
Martin#13-Feb-07 23:22
Martin#13-Feb-07 23:22 
GeneralRe: User Controls Pin
mark_w_13-Feb-07 23:39
mark_w_13-Feb-07 23:39 
AnswerRe: User Controls Pin
Martin#14-Feb-07 0:06
Martin#14-Feb-07 0:06 

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.