Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

CSS
+-----+------+........+---------+
|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<string>}
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
Comments
SDavisworth 5-Nov-13 0:03am    
Hello Radkrish... did you ever get resolve on this as I'm in a similar position?

1 solution

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
 
Share this answer
 
Comments
spins3 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900