Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

referring to different columns of a combobox

  • 12-11-2008 5:01pm
    #1
    Closed Accounts Posts: 2,268 ✭✭✭


    I have a combobox called cboUsers I fill it with a two column stored procedure
    Select UserID, UserName 
    From Users
    

    UserName is displayed.

    That is what I want.

    But...

    I need to get the value UserID

    Now I know that UserID is a valuemember for this combobox but how do I get the value without showing the number?

    MM


Comments

  • Registered Users, Registered Users 2 Posts: 610 ✭✭✭nialo


    what language?


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    If it's .Net the combobox has a selectedvalue property.


  • Closed Accounts Posts: 2,268 ✭✭✭mountainyman


    I can't believe I didn't post the language.

    It's VB.net

    Sorry again.


  • Registered Users, Registered Users 2 Posts: 610 ✭✭✭nialo


    As stevenmu said its SelectedValue or SelectedItem.Value. although if there is No selectedItem then you will get a null exception.


Advertisement