My project in c# contains dataGridView and I have a object containing data.
public class Data
{
public List<string> list {get;set;}
}
The data is initialized at program startup and the length of list can change. I want to bind the gridView to object that when gridView show each columns in gridview is bound to list in data object like this:
if list count = 3 , than i want gridView contains 3 columns - column0 bind to list[0], column01 bind to list[1], and so on.
i think that i need to bind gridView when form is loading , but how can i do this in my code?