DataGrid in ComboBox
We all know how to use the ComboBox, bind it to a collection and set DisplayMemberPath and we are done
we get a nice looking ComboBox
we can make it look like this with few tweaks (yes, DataGrid with all the functionality in the popup)
Download the code here
if you did not already leave the site, I am still looking for a job either in WPF or Silverlight, please let me know
Categories: Silverlight


Hey Lee,
Got any clues for creating a true ComboBox in which the items can be editabled? Maybe a ComboBox that can host a TextBox AND a DropDownList so that you could enter a name (ad hoc) into the combobox or select from the lists in the ItemSource.
I’m working on this now. Thought I might ping you to see if you got any ideas.
Great site, man.
Thanks,
Bruce
I am waiting for the release version. if the feature is not there in the release version. then I might take a shot at it. I would say we have to inherit from the ComboBox and change the template.
Yeah, that sounds good. Thanks.
Can you help me how to make the combobox editable when combobox has DataGrid.I want to Edit the
Combobox so that i can
add new item by editing in the combobox instead of
going to the last row in the DataGrid if my DataGrid Contains so many items.
Did you try this http://timheuer.com/blog/archive/2008/11/05/silverlight-editable-combobox-using-styles.aspx
Hi Lee,
Thanks for the good work.
I have a DataGrid with three columns of data in my combobox.
I want to select a row form DataGrid. and it should appear as selected item on Combobox.
ny idea how it is done…!!!
Thank you
Venu.
venu_hm@hotmail.com
what do you want to see as the selecteditem in the combobox( the datarow as it is displayed in datagrid)?
i want to see datagrid selected row to display on combobox.
yes
yes Lee, exactly i need that datarow as selected item in Combobox.
Here is a sample
http://cid-71b364b59919d1e8.skydrive.live.com/self.aspx/Public/blog%20files/Combobox%20with%20custom%20contenttemplate.zip.
I am not sure of having datarow there. but you can add borders etc
i am hau giang
i live in vietnam
i already download code come back home. But i can not use
i hope, you will send me another code
Lee,
Could you make this work with data loading from Web Service using LINQ to SQL Classes?
I am having error on the line
popup = (visualTreeHelper.GetChild…..
during runtime.
NullReferenceException was unhandled by user code.
I ma new to C#.