Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
485
Assigning arraylist as datasource to wingrid
posted

I have an class Employee

 

 

 

 

 

 

public class cEmployee

{public string sFirstName;

 

 

public string sLastName;

 

 

public int iAge;

 

 

public bool bMale;}

 

and an Arraylist ArrayList objList = new ArrayList();

 

I create the 3 objects of the class 

 

oEmployee =

new cEmployee();

oEmployee.sFirstName =

"Mike";

oEmployee.sLastName =

"Jack";

oEmployee.iAge = 32;

oEmployee.bMale =

true;

objList.Add(oEmployee);

oEmployee =

new cEmployee();

oEmployee.sFirstName =

"Rosy";

oEmployee.sLastName =

"M";

oEmployee.iAge = 29;

oEmployee.bMale =

false;

objList.Add(oEmployee);

oEmployee =

new cEmployee();

oEmployee.sFirstName =

"Ron";

oEmployee.sLastName =

"Lon";

oEmployee.iAge = 27;

oEmployee.bMale =

false;

and i am filling these objects in an arraylist

 

 

 

which i am passing as Datasource to the Grid.

objListGrid.DataSource = oEmployee;

 

I am not able to see any results why?