Completed
Last Updated: 14 Oct 2015 06:42 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 07 Oct 2015 11:06
Category: GridView
Type: Bug Report
0
FIX. RadGridView - incorrect layout when the GridViewColumnGroup.ShowHeader property is set to false for a pinned group when using ColumnGroupsViewDefinition
To reproduce:

public Form1()
{
    InitializeComponent();

    ColumnGroupsViewDefinition columnGroupsView;
     
    columnGroupsView = new ColumnGroupsViewDefinition();
    columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup());
    columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup());
    columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup());
    columnGroupsView.ColumnGroups.Add(new GridViewColumnGroup());

    columnGroupsView.ColumnGroups[0].ShowHeader = false;

    columnGroupsView.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
    columnGroupsView.ColumnGroups[0].Rows[0].ColumnNames.Add("colPINNED_LEFT");

    columnGroupsView.ColumnGroups[1].Rows.Add(new GridViewColumnGroupRow());
    columnGroupsView.ColumnGroups[1].Rows[0].ColumnNames.Add("colDATE");
    columnGroupsView.ColumnGroups[2].Rows.Add(new GridViewColumnGroupRow());
    columnGroupsView.ColumnGroups[2].Rows.Add(new GridViewColumnGroupRow());
    columnGroupsView.ColumnGroups[2].Rows[0].ColumnNames.Add("colTITLE");
    columnGroupsView.ColumnGroups[2].Rows[1].ColumnNames.Add("colTEXT");
   
    columnGroupsView.ColumnGroups[3].Rows.Add(new GridViewColumnGroupRow()); 

    columnGroupsView.ColumnGroups[3].Rows[0].ColumnNames.Add("colPINNED_RIGHT");

    this.radGridView1.ViewDefinition = columnGroupsView;

    this.radGridView1.Columns["colDATE"].Width = 110;
    this.radGridView1.Columns["colTITLE"].Width = this.radGridView1.Width - 181;

    this.radGridView1.TableElement.ViewElement.RowLayout.InvalidateRenderColumns();
    
    columnGroupsView.ColumnGroups[0].PinPosition = PinnedColumnPosition.Left;  
    columnGroupsView.ColumnGroups[3].PinPosition = PinnedColumnPosition.Right; 
    
}

Workaround: do not set the ShowHeader property to false. Use the ViewCellFormatting event to hide to necessary cell borders to simulate cells merging.
Attached Files:
0 comments