-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: TDP
Message 2 in Discussion


Hi Mrinal,
 
For the Combo box in winforms, if you need to hardcode values you can 
use
 
combobox.items.add("item1");
 
the name and values will be same. if you need name with different values 
then u may have to use a collectionlist(ListItem) to achieve that.
 
But we used a simple class as follows
 
 public class AddValue
 {
  private object 
m_Display;
  private object m_Value;
  public 
AddValue(object Display, object 
Value)
  {
   m_Display = 
Display;
   m_Value = 
Value;
  }
  public object 
Display
  {
   get{return 
m_Display;}
  }
  public object 
Value
  {
   get{return 
m_Value;}
  }
 }

 
Hope this helps...
 
Prasanth TD

>>> [EMAIL PROTECTED] 09/09/03 10:47AM 
>>>


  
  
    
    New Message on BDOTNET
  
    

combo box 
  in winforms


  
    
    
      Reply

      
        
          
          
             
            Reply to Sender   Recommend 
            Message 1 in Discussion 
            
    
      
        
          
          
            From: Mrinal 
          
            

              Hi EveryBody ,
               
              I am dealing with a very small but strange problem , can 
              anybody tell me how to set text strings and corresponding value 
              members in a combo box of  a winform , as we do in a 
              dropdownlist of a webform as both of them are analogous ,
               
              actually there's a option in case we set a datasource - 
              dataset / datatable , to set the text member and value member , 
              but what if i am hardcoding values ,
               
              any ideas or thoughts ,
               
              Regards ,
               
              Mrinal
               
View other groups in this 
  category. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to