Click here to Skip to main content
11,494,174 members (62,382 online)
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 Sergey Alexandrovich Kryukov 448
1 OriginalGriff 275
2 Nakul Chaudhari 240
3 CHill60 185
4 CPallini 175
0 Sergey Alexandrovich Kryukov 10,277
1 OriginalGriff 8,805
2 Sascha Lefèvre 3,704
3 Maciej Los 3,392
4 Richard Deeming 2,500


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 5 Nov 2013
Copyright © CodeProject, 1999-2015
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