Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WPF DataGridView
Hello All,
I a particular requirement as follows;
Table of data Items (as shown below)where number of columns are known only at the design time
 
+-----+------+........+---------+
|Col 1|Col 2 |        |  Col N  |
|     |      |        |         |
+-----+------+........+---------+
|  D1 |  D 1 |        |         |
|     |  D 2 |        |         |
|     |   .  |        |         |
|     |   .  |        |         |
|     |  D N |        |         |
+-----+------+........+---------+
|  D1 |  D 1 |        |         |
|     |  D 2 |        |         |
|     |  D 3 |        |         |
+-----+------+........+---------+
 
if we look at the column 2, row 1 and 2 it contains a variable number of items to be displayed, again the number of data items are known only at the design time !
 
I have data models as follows
Class Col -> represents a cell {Members are" ColName,ObservableList}
Class Row -> represents a Row {Members are" RowNumber,ObservableList}
and finally I have an observable list of Rows which represents the entire table
 
Could somebody suggest me How I make a display using WPF as shown above?
 
Thanks in advance.
Krish
Posted 1-May-13 14:23pm
Comments
SDavisworth at 5-Nov-13 0:03am
   
Hello Radkrish... did you ever get resolve on this as I'm in a similar position?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hello Davis,
 
It is small application so I switched to WPF instead of windows forms.
 
In WPF it is possible to define a template for each column and handle the event thats populating the grid to add items to the list box.
 
Hope that helps!
 
Regards
Krish
  Permalink  
Comments
spins3 at 10-Apr-14 8:01am
   
Hello Krish can you please give a sample snippet.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 230
3 Shweta N Mishra 186
4 Aajmot Sk 153
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 5 Nov 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100