Completed
Last Updated: 20 Aug 2015 15:04 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 30 Dec 2014 07:17
Category: GridView
Type: Bug Report
0
FIX. RadGridView - ColumnGroupsViewDefinition changes columns order in RightToLeft mode when one of the groups is pinned to left
To reproduce:

public Form1()
{
    InitializeComponent();

    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;
    radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;

    view.ColumnGroups[0].PinPosition = PinnedColumnPosition.Left;  
}

Please see the attached screenshot.

Workaround: add the columns belonging to the pinned group in a reversed order. 
0 comments