1

I'm trying to code a WPF 4.0 DataGrid that matches a database table, with two entries in particular GroupID and SectionID... GroupID contains a collection of groups, and SectionID should be built from a table that takes a {GroupID, SectionID} keys and returns section information.

Binding the DataGridComboBoxColumn to the groups table to show the group names is easy using an ObjectDataProvider, but I can't work out how to do the sections given the fact I need to pass the relevant GroupID for the item into the GetSections() method the ObjectDataProvider is bound to...

Anybody else solved something similar?

Mike Hudgell
  • 307
  • 1
  • 3
  • 13

1 Answers1

0

Here is a link that explains a lot about a DataGridComboBoxColumn: link. Also, I would try to bind the DataGrid to an ObservableCollection of a class in which you add properties for each of your columns and then bind each column to a property of the class. By the way I've only done this in C# 3.5...

Partial
  • 9,529
  • 12
  • 42
  • 57
  • http://blogs.msdn.com/vinsibal/archive/2008/12/17/wpf-datagrid-dynamically-updating-datagridcomboboxcolumn.aspx is also a useful link – Mike Hudgell Nov 22 '09 at 16:53