Binding Generic List Array to GridView
        Posted  
        
            by OliverS
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by OliverS
        
        
        
        Published on 2009-03-06T16:32:26Z
        Indexed on 
            2010/03/15
            3:19 UTC
        
        
        Read the original article
        Hit count: 362
        
Hi I have a List which returns an array of "Question". My question is how can I bind this to a grid view? When I try to call Question.Ordinal I get that it does not exist in the data source. I am using the following code:
GridView1.DataSource = myList.GetQ();
GrdiView1.DataBind();
myList.GetQ() returns a List which is an array of "Question".
When I set the column DataField to "!" I get the object Question. My question is how can I get the objects property? I tried "!.Ordinal" does not work. I was reading this post for reference, here, any help is greatly appreciated, thanks.
© Stack Overflow or respective owner