case statement not working

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: case statement not working

 
0
  #11
Feb 27th, 2009
And in debugging what was the value of say "bunitsCB.Text"
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 66
Reputation: MJV is an unknown quantity at this point 
Solved Threads: 0
MJV MJV is offline Offline
Junior Poster in Training

Re: case statement not working

 
0
  #12
Feb 27th, 2009
Originally Posted by LizR View Post
And in debugging what was the value of say "bunitsCB.Text"
Thats just the problem. Im not getting a value for bunitsCB.Text. The value is visible on the screen but I cannot figure out how to call it for the switch statement. It is in the database, it shows in the combo box but unless I reselect it it does not get assigned to bunitsCB.Text.

HELPPPPPPP
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: case statement not working

 
0
  #13
Feb 27th, 2009
Then dont use the .Text but the selected item... and yes I know you had an error before but it was the right thing just in the wrong way
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 45
Reputation: bcasp is an unknown quantity at this point 
Solved Threads: 10
bcasp bcasp is offline Offline
Light Poster

Re: case statement not working

 
0
  #14
Feb 27th, 2009
When you set the DataSource or load the Items manually, you could just set the SelectedIndex property to 0. That should keep you from getting errors about nothing being selected. I guess whether or not you can do this would have to depend on any Business rules in place or requirements.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC