BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void button1_Click(object sender, System.EventArgs e) { this.gridDataBoundGrid1.Binder.InternalColumns.RemoveAt(1); this.gridDataBoundGrid1.Model.ColCount--; this.gridDataBoundGrid1.Refresh(); }
private GridBoundColumn saveCol = null; private void button1_Click(object sender, System.EventArgs e) {//save and delete item 1 saveCol = this.grid.Binder.InternalColumns[1]; this.grid.Binder.InternalColumns.RemoveAt(1); this.grid.Model.ColCount--; this.grid.Refresh(); } private void button2_Click(object sender, System.EventArgs e) {//insert the saved column at item 1 GridBoundColumnsCollection gbcc = this.grid.Binder.InternalColumns; GridBoundColumn[] boundCols = new GridBoundColumn[gbcc.Count + 1]; int insertLocation = 1; int offSet = 0; for(int i = 0; i < gbcc.Count + 1; ++i) { if(i == insertLocation) { boundCols[i] = saveCol; offSet = 1; } else { boundCols[i] = gbcc[i - offSet]; } } gbcc.Clear(); gbcc.AddRange(boundCols); this.grid.Model.ColCount++; this.grid.Refresh(); }