Completed
Last Updated: 08 Jun 2015 11:06 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 04 Mar 2015 07:09
Category: GridView
Type: Bug Report
0
FIX. RadGridView - dragging a right pinned GridViewColumnGroup and dropping it on a new index makes the group blank
Use the following code snippet and follow the illustrated steps on the attached gif file:

 private void Form1_Load(object sender, EventArgs e)
 {
     this.customersTableAdapter.Fill(this.nwindDataSet.Customers);
     this.radGridView1.DataSource = this.customersBindingSource;
     this.radGridView1.BestFitColumns(BestFitColumnMode.AllCells);
     ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
     view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));
     view.ColumnGroups.Add(new GridViewColumnGroup("Details"));
     view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Address"));
     view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Contact"));
     view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
     view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["CompanyName"]);
     view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactName"]);
     view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactTitle"]);

     view.ColumnGroups[1].Groups[0].Rows.Add(new GridViewColumnGroupRow());
     view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Address"]);
     view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["City"]);
     view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Country"]);

     view.ColumnGroups[1].Groups[1].Rows.Add(new GridViewColumnGroupRow());
     view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Phone"]);
     view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Fax"]);
     radGridView1.ViewDefinition = view;
 }
Attached Files:
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments