The question I have is how to -=> Effectively <=- and -=> Efficently <=-
bind a DataGrid to a 1 deep organizational chart, where "R" would be a
row of data and 1..N would be the columns of the row. I need to have the
data displayed and updated/added, so I will need 2 way binding.


+---+
| R | (View this in NotePad)
+---+
|
+-------+-------+-------+-------+
| | | | |
+---+ +---+ +---+ +---+ +---+
| 1 | | 2 | | 3 | |...| | N |
+---+ +---+ +---+ +---+ +---+


I am currently creating the columns of the DataGrid dynamically, which
works fine. The binding is where I am getting stuck. A -=> Very <=-
simplistic view of my data looks like this.



+-----------------------------+
| MyRowCollection |
+-----------------------------+
| Guid ID |
| MyRowCollection rows |
+-----------------------------+
| 1
| to
| N
+-----------------------------+
| MyRow |
+-----------------------------+
| Guid ID |
| MyColumnDataCollection data |
+-----------------------------+
| 1
| to
| N
+------------------+
| MyColumnData |
+------------------+
| Guid ID |
| object data |
+------------------+



Any thoughts would be appreciated.

Dave

Re: Complex DataGrid Binding by Oliver

Oliver
Tue Sep 06 10:24:25 CDT 2005

Dave wrote:

>The question I have is how to -=> Effectively <=- and -=> Efficently <=-
>bind a DataGrid to a 1 deep organizational chart, where "R" would be a
>row of data and 1..N would be the columns of the row. I need to have the
>data displayed and updated/added, so I will need 2 way binding.

<snip>

If you want to combine rows into one grid view that don't have the same
columns, you'll need to use an ITypedList implementation with your own
property descriptors, which can make up for the fact that some fields may
not be defined for a specific row. I have written a blog article about
this in the past, which you can find here:

http://www.sturmnet.org/blog/archives/2005/02/04/simulating-fields/

Hope this helps!


Oliver Sturm
--
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)