Hello,
how i can wrap text only for header text ?
I use this kind of solve but every cell are wraping.
And how i can check what kind of data (date, bool, number) in colums... ?
Thanks for help (my controls Q1 2010 SP2)
how i can wrap text only for header text ?
foreach (Telerik.WinControls.UI.GridViewDataColumn items in radGridView.Columns)
{
items.WrapText = true;
}
I use this kind of solve but every cell are wraping.
And how i can check what kind of data (date, bool, number) in colums... ?
Thanks for help (my controls Q1 2010 SP2)
4 Answers, 1 is accepted
0
Hello Marcin,
Thank you for writing.
You can wrap the text of the header row by handling the ViewCellFormatting event. Please consider the following code snippet:
I hope this helps. Let me know if you have any other questions.
All the best,
Martin Vasilev
the Telerik team
Thank you for writing.
You can wrap the text of the header row by handling the ViewCellFormatting event. Please consider the following code snippet:
void
radGridView1_ViewCellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.CellElement
is
GridHeaderCellElement)
{
e.CellElement.TextWrap =
true
;
}
}
I hope this helps. Let me know if you have any other questions.
All the best,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ken
Top achievements
Rank 1
answered on 19 Sep 2011, 02:36 PM
Is there somewhere I can now calculate the required height for the header? I don't want to set the whole grid to automatic row height, just the header. I would also need to trap required height changes when the user resizes columns and causes a header to wrap or unwrap.
Thanks
Thanks
0
Hello Ken,
Thank you for writing.
RadGridView does not support setting auto size only to the header row. However, you can work-around this limitation by setting AutoSize property to true and choose a fixed value for MinHeight and MaxHeight of every data row as demonstrated below:
Hope this helps. Let me know if you have any other questions.
All the best,
Martin Vasilev
the Telerik team
Thank you for writing.
RadGridView does not support setting auto size only to the header row. However, you can work-around this limitation by setting AutoSize property to true and choose a fixed value for MinHeight and MaxHeight of every data row as demonstrated below:
public
Form1()
{
InitializeComponent();
this
.radGridView1.AutoSizeRows =
true
;
this
.radGridView1.RowFormatting +=
new
RowFormattingEventHandler(radGridView1_RowFormatting);
}
void
radGridView1_RowFormatting(
object
sender, RowFormattingEventArgs e)
{
e.RowElement.RowInfo.MaxHeight = e.RowElement.RowInfo.MinHeight = 25;
}
Hope this helps. Let me know if you have any other questions.
All the best,
Martin Vasilev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sree
Top achievements
Rank 1
answered on 03 Jan 2013, 01:38 AM
Thanks it working perfect :)