Wednesday, August 25, 2010

Use ComboBox in DataForm with DataServices in Silverlight 4

I have this scenario when I want to show user object in DataForm, in this user there is one ComboBox which show UserType. 

image

this is the Table Structure, which show the connection between PP_User and DD_UserType.
The final result is going to be like this:
image

Here is the XAML code:
image

Note: you can replace RadComboBox with normal ComboBox.

Create the Converter:
image

Method to GetUsers and Fill the DataForm with the result from this GetUsers
image

then GetUserType Method to get UserType data and fill it into combobox:
image

That’s it you’re done. Hope this help, this is my first attempt to write :) just email me if something not clear: at jlukmanh at yahoo dot com

1 comment:

Unknown said...

Any Downloadable sample application...??