-
Sep 28th, 2013, 11:43 AM
#1
Thread Starter
Frenzied Member
How to bind combobox in datagrid header?
Hi!
My app has a datagrid with comboboxes in the datagridheaders, one for each column. It is bound to a datatable object.
I am looking for a way to enforce a 2 way binding between the selectedvalue in the combobox and the viewmodel. My idea was to bind the selected string for each combobox to the caption property of the datagridcolumn. Then I can set the selected value of the combobox programmatically from the viewmodel simply by manipulating the datatable, and whenthe user select a diffrent value inthe combobox I can read that value from the caption property.
Is there a better way? And how do I set up this binding? I have tried lots of different binding expressions but got lots of errors?
Oh, the number of columns in the datagrid is dynamic, but that shouldn't pose a problem.
Please help me out here!
/S
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|