K
kids_pro
I created a simple Person class as following:
class Person{
private string fname;
private string lname;
public Person(string fname, string lname){
this.fname = fname;
this.lname = lname;
}
public string FirstName{
get{return this.fname;}
set{this.fname = value;}
}
public string LastName{
get{return this.lname;}
set{this.lname = value;}
}
}
-- I create Person ArrayList
ArrayList pList = new ArrayList();
pList.Add(new Person("Jame","C."));
pList.Add(new Person("Jonh","D."));
-- binding to datagrid
dataGrid1.DataSource = pList;
-- select data grid row and get back the selected Person object.
How can I complete this stage?
Regards,
Kids
class Person{
private string fname;
private string lname;
public Person(string fname, string lname){
this.fname = fname;
this.lname = lname;
}
public string FirstName{
get{return this.fname;}
set{this.fname = value;}
}
public string LastName{
get{return this.lname;}
set{this.lname = value;}
}
}
-- I create Person ArrayList
ArrayList pList = new ArrayList();
pList.Add(new Person("Jame","C."));
pList.Add(new Person("Jonh","D."));
-- binding to datagrid
dataGrid1.DataSource = pList;
-- select data grid row and get back the selected Person object.
How can I complete this stage?
Regards,
Kids