Adding New Item to Combobox

Page 1 of 1

2 Replies - 4166 Views - Last Post: 13 May 2012 - 11:20 PM Rate Topic: -----

#1 issac999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 22-February 12

Adding New Item to Combobox

Posted 10 May 2012 - 11:27 PM

im using a ComboBox and binding it with ItemsSource and getting the values to itemsource from ObjectDataProvider
as all are Enum values...
now i would like to add default text "ALL" to the ComboBox ..
i dont want to add this "ALL" to the enum list class file as im using that class file for other pages also
so i just want to display these enum values with "ALL" and also it should be visible even if they select other items from the ComboBox.

any help needed...

Is This A Good Question/Topic? 0
  • +

Replies To: Adding New Item to Combobox

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5535
  • View blog
  • Posts: 11,857
  • Joined: 02-June 10

Re: Adding New Item to Combobox

Posted 10 May 2012 - 11:39 PM

Programmatically populate the combobox each time the .Opened event happens. Copying in all the values from the source plus your "ALL" option.



Quote

and also it should be visible even if they select other items from the ComboBox.


That makes no sense. A combobox shows one like: The selected item.
Are you saying you want it to display "ALL" even if the user selects a different option like "SOME" or "FEW" or "MANY"? That is going to make it look like a completely different choice has been made than the one the user selected.
Was This Post Helpful? 0
  • +
  • -

#3 issac999  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 22-February 12

Re: Adding New Item to Combobox

Posted 13 May 2012 - 11:20 PM

thank u for ur reply...HERE IS THE LINK....for which im exactly looking for

<my:Item CategoryName="All" CategoryID="%" />

but im unable to understand how to do the above line....
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1