Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

How to do data binding of PrintQueueCollection into Combo Box.

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 08-30-2006   #1 (permalink)
=?Utf-8?B?Q3RB?=
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 SpecsSystem Spec
Old 08-30-2006   #2 (permalink)
=?Utf-8?B?Q3RB?=
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 SpecsSystem Spec
Closed Thread

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


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51