Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8660755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:20:13+00:00 2026-06-12T16:20:13+00:00

I have been looking all over the internet (googling pretty much) and have found

  • 0

I have been looking all over the internet (googling pretty much) and have found no answer to this simple question and thus I’m starting to think it might not be possible.

Ok so I have a RibbonCombobox up in my ribbon. Here’s the code

<ribbon:RibbonComboBox  
                  SelectionBoxWidth="150"
                  VerticalAlignment="Center" 
                  IsEditable="False" Name="cbConsultationRapideEmploye">
                        <ribbon:RibbonGallery Name="cbConsultationRapideEmployeG" SelectedValuePath="Name"
                          MaxColumnCount="1">
                            <ribbon:RibbonGalleryCategory Name="cbConsultationRapideEmployeGC" Margin="0" Padding="0" ItemsSource="{Binding}" DisplayMemberPath="NomEmploye" />
                        </ribbon:RibbonGallery>
                    </ribbon:RibbonComboBox>

I populate this combobox from a dataset on load.

What I want to do is set on load the selected item to be the first one in the list.
I know that there is a SelectedItem property on the RibbonGallery, but sometimes it works just way better with an index.

I could probably roll with setting the SelectedItem as the first item in my Dataset but in the case of fetching info, fetching the text is not really an option as I will want the ID (from the database) of the employee and not his name.

If someone has an alternate solution I’m all open to suggestions.

EDIT:
As per request here is the code where the combobox gets his values.

bd.openConnection()
dsCbNomEmploye = bd.queryds("SELECT Prenom + ' ' + Nom AS NomEmploye FROM tblEmploye ORDER BY 1", "tblEmploye")
cbConsultationRapideEmploye.DataContext = dsCbNomEmploye.Tables(0).DefaultView
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:20:14+00:00Added an answer on June 12, 2026 at 4:20 pm

    I ended up adding the SelectedValuePath on the RibbonGallery tag like so

    <ribbon:RibbonComboBox  
                      SelectionBoxWidth="150"
                      VerticalAlignment="Center" 
                      IsEditable="False" Name="cbConsultationRapideEmploye">
                            <ribbon:RibbonGallery SelectedValuePath="idEmploye" Name="cbConsultationRapideEmployeG"
                              MaxColumnCount="1">
                                <ribbon:RibbonGalleryCategory Name="cbConsultationRapideEmployeGC" Margin="0" Padding="0" ItemsSource="{Binding}" DisplayMemberPath="NomEmploye" />
                            </ribbon:RibbonGallery>
                        </ribbon:RibbonComboBox>
    

    Afterwards if you need the text value you can get it with the cbConsultationRapideEmployeG.SelectedItem and if you need the actual value you can get it with cbConsultationRapideEmployeG.SelectedValue

    In short SelectedItem=Displayed value
    SelectedValue=not shown value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking all over the Internet for an answer to this question
I have been looking all over for an answer to this question, but can't
I have been looking all over the Internet for this and have found similar,
Good morning. I have been looking all over trying to answer this question. If
I have been looking all over the internet and i found some good guides
Hey I have been looking all over the internet and this site for hours
I've been looking all over StackOverflow and Google for an answer to this question,
I have been looking all over the internet and stackoverflow for a concrete answer
So I have a pretty simple problem here, been looking all over the web
I have been looking all over for this. I have two seperate prpt files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.