Hello,
I have a RadGridView for which the columns are generated dynamically at run-time.
I need to have the columns be as wide as they need to be for the cell's content but wrap on the column headers so the header text does not define the column width.
I have seen a similar post on these forums but the columns were defined in the Xaml, and the headers contained TextBlock.
In my case, the columns are created during the AutoGeneratingColumn event. As for the headers they are created this way:
Where GetHeaderName returns a string.
I have a RadGridView for which the columns are generated dynamically at run-time.
I need to have the columns be as wide as they need to be for the cell's content but wrap on the column headers so the header text does not define the column width.
I have seen a similar post on these forums but the columns were defined in the Xaml, and the headers contained TextBlock.
In my case, the columns are created during the AutoGeneratingColumn event. As for the headers they are created this way:
private
void
dg_AutoGeneratingColumn(
object
sender, GridViewAutoGeneratingColumnEventArgs e)
{
e.Column.Header = GetHeaderName(e.Column.UniqueName);
}
Where GetHeaderName returns a string.