locked
Bind list<interface> to 2 colomns RRS feed

  • Question

  • I try to add 2 lists to the datagridview so that i have 2 columns.
    each list for a column. How can i do that?

        List<IPrerequisite> source = new List<IPrerequisite>(_prerequisites1.Count + _prerequisites2.Count);
        source.AddRange(_prerequisites1);
        source.AddRange(_prerequisites2);

    I'm using C# framework 2.0

     

    Monday, April 8, 2013 2:15 PM

Answers

  • I try to add 2 lists to the datagridview so that i have 2 columns.
    each list for a column. How can i do that?

    Hi Akh-Mohamed,

    If you set the source as database, the columns would be public properties of IPrerequisite.

    To set list as columns, you can create a datatble and add each value under correct column.

    Best Regards,


    Bob Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Sunday, May 5, 2013 5:51 AM
    Tuesday, April 9, 2013 7:20 AM