Binding Generic List Array to GridView

后端 未结 3 1793
慢半拍i
慢半拍i 2021-01-28 07:53

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

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-28 08:41

    you must be define the property member of class, as a propery ie

    public string ProductName
    {
        get
        {
            return _productName;
        }
        set { }
    
    }
    

    Or VB

    public property ProductName() as string set ..

    get...

    end property

    important: Is Required defined get method

提交回复
热议问题