PC Review


Reply
Thread Tools Rate Thread

Complex DataGrid Binding

 
 
=?Utf-8?B?RGF2ZQ==?=
Guest
Posts: n/a
 
      6th Sep 2005
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
 
Reply With Quote
 
 
 
 
Oliver Sturm
Guest
Posts: n/a
 
      6th Sep 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/archive...lating-fields/

Hope this helps!


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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid complex binding Sam Microsoft Dot NET Framework Forms 0 7th Oct 2005 11:25 AM
Complex DataGrid Binding =?Utf-8?B?RGF2ZQ==?= Microsoft Dot NET Framework Forms 0 6th Sep 2005 04:20 PM
Complex DataGrid Binding =?Utf-8?B?RGF2ZQ==?= Microsoft C# .NET 0 6th Sep 2005 04:20 PM
DataGrid Binding to Complex Custom Collection Conawapa11 Microsoft ASP .NET 1 14th Nov 2003 12:59 PM
DataGrid Complex Binding K Microsoft C# .NET 5 17th Sep 2003 09:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:34 PM.