如何将gridcontrol
记录作为数组获取?
我将一个数组设置为 a datasource
for a gridcontrol (devExpress component)
。
PersonFamily4grid[] tmpPersonFamily = new PersonFamily4grid[PersonFamiliesCOUNT];
for (int i = 0; i < PersonFamiliesCOUNT; i++)
{
tmpPersonFamily[i] = new PersonFamily4grid();
tmpPersonFamily[i].BirthDate = PersonFamilies[i].BirthDate;
tmpPersonFamily[i].Job = PersonFamilies[i].Job;
tmpPersonFamily[i].CodeMelli = PersonFamilies[i].CodeMelli;
tmpPersonFamily[i].NameFamily = PersonFamilies[i].NameFamily;
tmpPersonFamily[i].Nesbat = FamilyInfo_cbe_Nesbat.Properties.Items[PersonFamilies[i].Nesbat].ToString();
tmpPersonFamily[i].Taahol = FamilyInfo_cbe_Taahol.Properties.Items[Convert.ToInt32(PersonFamilies[i].Taahol)].ToString();
}
grid_Family.DataSource = tmpPersonFamily;
现在,当用户更改数据时gridcontrol
,我想从网格中获取更改并影响我的基本数组。