Quote:
Originally Posted by alexandarx5
how can i create employees and bind grid to a collection?
|
i use "dapfor.Net Grid" check the below codes
//Create some employees and bind grid to the collection:
List<Employee> employees = new List<Employee>();
employees.Add(new Employee("John Smith", "Department of climate", "Director IT Security"));
employees.Add(new Employee("Walter Gaber", "Department of energy", "Divisional Support Unit Officer "));
employees.Add(new Employee("James Nickolls", "Department of energy", "Scientific Programer"));
employees.Add(new Employee("Cora Cornell", "Department of climate", "Head of Department"));
employees.Add(new Employee("Andrew Jebb", "Department of climate", "Divisional Support Unit Officer"));
employees.Add(new Employee("Julia Treace", "Department of energy", "Operations Manager"));
employees.Add(new Employee("Francis Maunton", "Department of climate", "Climate Change Coordinator"));
grid.DataSource = employees;
}