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

  • Home
  • SEARCH
  • 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 682217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:34:16+00:00 2026-05-14T01:34:16+00:00

I am trying to display a default value (or even NO value) when selected

  • 0

I am trying to display a default value (or even NO value) when selected index is -1, or selecteditem is null. This normally works perfectly fine but when I enable IsSynchronizedWithCurrentItem and set it to True, the first value in my DataTable gets displayed. How can I have both IsSynchronizedWithCurrentItem =”True” and show no/default value when it is loaded.

My Combo Box XAML:

<GroupBox Name="ClientGroup" Header="Client" Margin="63,182,0,177" FontSize="14" HorizontalAlignment="Left" Width="298">
<ComboBox Name="Supplier" Grid.IsSharedSizeScope="True" ItemsSource="{Binding}" IsEditable="True" Text="Please Choose..." TextSearch.TextPath="CompanyName" IsSynchronizedWithCurrentItem="True" Height="23" VerticalAlignment="Top" Margin="0,6,6,0" FontSize="11" StaysOpenOnEdit="True">
    <ComboBox.ItemTemplate>
        <DataTemplate>
            <Grid Margin="0,5,0,5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="CompanyName" />
                    <ColumnDefinition Width="Auto" SharedSizeGroup="EIC" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding CompanyName}" Grid.Column="0" />
                <TextBlock Text="{Binding EIC, StringFormat=' ({0})'}" Grid.Column="1" FontFamily="Courier New" FontWeight="Bold" FontSize="12" />
            </Grid>
        </DataTemplate>
    </ComboBox.ItemTemplate>
</ComboBox>
</GroupBox>

My CS code behind:

ClientGroup.DataContext = (new CompanyDealsDataSetTableAdapters.CompanyTableAdapter()).GetData();

When I start my application it automatically selects the first row in my data table. It works as expected when I remove IsSynchronizedWithCurrentItem.

Anyone have any solutions?

  • 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-05-14T01:34:16+00:00Added an answer on May 14, 2026 at 1:34 am

    Found the answer, and it was much more simple than I thought.

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Supplier.Text = null;
        }
    

    This seems to work, and all my bound field are set to null/default values :).

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

Sidebar

Related Questions

I'm trying to display the page title (html title) on the default.aspx page of
Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
I've been trying to get a slider to display its current value next to
Hi I am trying to display the database value on the dropdownlist in the
I am trying to get the default value to not go away on click,
I'm implementing an Android app to load RSS feed. It works perfectly fine until
I am trying to get the selected dropdown value and perform a slideDown on
I am trying to call the function on the click of the value selected
I'm trying to figure out how I can insert a NULL value into a
I am trying to pass an extra value out of my index and I

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.