Click here to Skip to main content
11,929,283 members (56,510 online)
Rate this:
Please Sign up or sign in to vote.
See more: Windows XAML WPF , +
Dear Experts,

In my WPF project we are using WPF Extended toolkit version 1.8.0

Here i have taken CheckComboBox in XAML Like Below

<xctk:checkcombobox height="20" name="LocaleSelector"                              Margin="226,12,26,429" ItemSelectionChanged="LocaleSelector_ItemSelectionChanged"> </xctk:checkcombobox>

Then in my code view we are binding with the database.
public void BindComboBox()
                SqlConnection conn = new SqlConnection(str);
                SqlDataAdapter da = new SqlDataAdapter("select Department_Name from Dept", conn);
                DataSet ds = new DataSet();
                da.Fill(ds, "dept");
                Selector sel = new Selector();
               if (ds.Tables["dept"].Rows.Count > 0)
                    foreach (DataRow dr in ds.Tables["dept"].Rows)
            catch (Exception ex)
                throw ex;
This code is working fine. but we need that when user selects All from the checkcombobox then we want disable or make readonly or something else for remaining items from the checkcombobox and vice-versa.

Please provide me your valuble ideas to implement this.
Posted 23-Jan-13 19:50pm
Edited 24-Feb-13 18:30pm
Thomas Duwe 29-Jan-13 3:11am
How about listening to the Selected/Unselected event of the CheckComboBox and if the 'All' item is selected(checked), then
set IsEnabled=false for all other items and optionally remove all other items from the SelectedItems property of the CheckComboBox.
That's really not the best way but it should work.
Matt T Heffron 11-Feb-13 13:39pm
It might be easier, both for you AND for the user, if, instead of having the All selection disable everything else in the list, just have everything else in the list unselect All.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 24 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100