This is a migrated thread and some comments may be shown as answers.

Autosize Group Descriptor rows

1 Answer 11 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 16 Mar 2018, 01:34 AM

How do I make the group descriptor rows automatically increase in height so that they display all of the text?

Note I'm setting the text in the groupSummaryEvaluate event

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Mar 2018, 08:13 AM
Hello, Simon, 

Thank you for writing.  

You can set the RadGridView.AutoSizeRows property to true in order to automatically adjust the row's height according. Then, you can subscribe to the ViewCellFormatting event and wrap the cell's text for the group headers:
  
public RadForm1()
{
    InitializeComponent();
    this.radGridView1.AutoSizeRows = true;
    this.radGridView1.ViewCellFormatting += radGridView1_ViewCellFormatting;
}
 
private void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    if (e.CellElement is GridGroupContentCellElement)
    {
        e.CellElement.TextWrap = true;
    }
    else
    {
         e.CellElement.ResetValue(LightVisualElement.TextWrapProperty, ValueResetFlags.Local);
    }
}



I hope this information helps. Should you have further questions I would be glad to help. 
 
 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Simon
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or