Home Forums WinForms controls Xceed Grid for WinForms Fine grain control over how grid lines are drawn Reply To: Fine grain control over how grid lines are drawn

User (Old forums)
Member
Post count: 23064

In this case, it is better to override the GroupManagerRow class, and repaint everything so it paints where you want when increasing the height of the row.  I have attached the overridden class to this post.  Once you’ve implemented it, you can use it in your project the following way :

    private void Form1_Load(object sender, System.EventArgs e)
    {    
      gridControl1.GroupAdded += new GroupAddedEventHandler(gridControl1_GroupAdded);
    }

    private void gridControl1_GroupAdded(object sender, GroupAddedEventArgs e)
    {
      CustomGroupManagerRow customGroupManagerRow = new CustomGroupManagerRow();
      e.Group.HeaderRows.Clear();
      e.Group.HeaderRows.Add( customGroupManagerRow );
    }
 

This way, whether you add a group in code or a user drags a column header in the GroupByRow, all the groups will use the custom GroupManagerRow.

Imported from legacy forums. Posted by André (had 2008 views)