摘要:GRID 展開/縮放 MASTER-DETAIL
bool isExpand = true;
private void simpleButton3_Click(object sender, EventArgs e)
{
ExpandAllRows(gridView1 , isExpand);
isExpand = ! isExpand;
}
public void ExpandAllRows(DevExpress.XtraGrid.Views.Grid.GridView view ,bool Expand)
{
view.BeginUpdate();
try
{
int dataRowCount = view.DataRowCount;
for (int rHandle = 0; rHandle < dataRowCount; rHandle++)
view.SetMasterRowExpanded(rHandle, Expand);
}
finally
{
view.EndUpdate();
}
}