wpf - access the Window's DataContext from within a DataGrid -


I have a problem reaching the data syntax of the window from within a Datagridon.

Datagrid is an IBindingList:

Receive Public IBindingList Items { Set; } Private Zero initItems () {// ItemFactory is a Linq2SQL context, item items availabe has this footage. It = this. ITMFitator ITEM GetNewBindingList (); }

From within my XML, I try to get the data to fill the combo box:

    

But it does not work. I have already tried many variations and did not come to the combo box.
Any help greatly appreciated!

Note:

The following combo box works in the same window:

  & lt; Combo Box x: Name = "Kamkambu" items Source = "{Binding Path = Items}" Pradrshnmnbrpath = "description" Selected Valupth = "item Aidiaidi" / & gt;    

not

Detagrid Comboboks column directly connected to the visual tree and Therefore, FindAncestor -operation will fail (and this will not be taken into the Datacontext).

  • The easiest solution to create a Wumolod Each box and provide items Srs to the combo box. The
  • A DataGridTemplateColumn by and ComboBox DataTemplate in use.
  • There is another post about this problem. Also look at the post.

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -