int x = this.xGrid1.Columns[0].DisplayIndex; int y = this.xGrid1.Columns[1].DisplayIndex; this.xGrid1.Columns[0].DisplayIndex = y; this.xGrid1.Columns[1].DisplayIndex = x;