This is a migrated thread and some comments may be shown as answers.

Grid Binding

1 Answer 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
oneshot
Top achievements
Rank 1
oneshot asked on 04 Feb 2008, 11:34 PM
Hi All,

I have a Generic List of Category objects built for my program in c# which I am binding the gridview to.

The category object has a Summary property which is a class with multiple Integer and Decimal properties
e.g.

Category  
   |-CategoryName  
   |-Summary  
        |-TotalPoints  
        |-Potential Points  
           .   
           .  
           . 

What i am looking to do is have the following columns in each row;
CategoryName, TotalPoints, PotentialPoints.

I have Used CategoryName as the data field for my first column and this displays fine, i have then entered Summary.TotalPoints in the data field for the next column but this displays nothing but also throws no error!

I am considering just moving the properties up from the summary object to the category object to overcome this but would prefer not to.

Any help would be great.

Thanks in advance
Wes

1 Answer, 1 is accepted

Sort by
0
oneshot
Top achievements
Rank 1
answered on 04 Feb 2008, 11:43 PM
Apologies,

Please ignore this post it seems renaming properties after setting them as the data field in a gridview isn't really a good idea!  This is now working!

Thanks
Wes
Tags
GridView
Asked by
oneshot
Top achievements
Rank 1
Answers by
oneshot
Top achievements
Rank 1
Share this question
or