View Single Post
  #2 (permalink)  
Old June 4th, 2016, 07:09 PM
omosis2 omosis2 is offline
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create some employees and bind grid to the collection:

Quote:
Originally Posted by alexandarx5 View Post
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;
}
Reply With Quote