![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | How to do data binding of PrintQueueCollection into Combo Box. Hi, I have a PrintQueueCollection object which contains list of PrintQueue, I want to display list of printer in the ComboBox, PrintQueue object has Name attribute. PrinterList is instance of PrintQueueCollection in the Window1 class. At constructor of Window1, i'm doing this.DataContext=this; so other data bindings are working ok. Only printer list combo box displays empty. <Window... <ComboBox ItemSource="{Binding Path=PrinterList}" ItemTemplate ="{Binding Path=Name}" > </ComboBox> </Window> Most of the sample are using ObservableCollectionCollection to do, How about other type of collections? Thanks Charles |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: How to do data binding of PrintQueueCollection into Combo Box. PrinterList is empty, it worked fine when i get print queue collection from local print server object. "CtA" wrote: > Hi, > I have a PrintQueueCollection object which contains list of PrintQueue, I > want to display list of printer in the ComboBox, PrintQueue object has Name > attribute. > > PrinterList is instance of PrintQueueCollection in the Window1 class. > At constructor of Window1, i'm doing this.DataContext=this; > so other data bindings are working ok. Only printer list combo box displays > empty. > > <Window... > <ComboBox > ItemSource="{Binding Path=PrinterList}" > ItemTemplate ="{Binding Path=Name}" > > </ComboBox> > </Window> > > Most of the sample are using ObservableCollectionCollection to do, > How about other type of collections? > > Thanks > Charles > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Where is the data bound combo box like in vb6? | bill | .NET General | 2 | 07-22-2008 09:35 PM |
| [WPF] data binding and SetValue() | Lloyd Dupont | Avalon | 2 | 06-16-2007 10:08 AM |
| Data binding in a FlowDocument | Mark at S&W | Avalon | 0 | 05-13-2006 09:55 PM |
| data binding | Joerg Engel | Avalon | 1 | 03-22-2006 03:18 AM |
| Data binding with DataGrid | Vijay | Avalon | 1 | 02-21-2006 01:36 PM |