5 Answers, 1 is accepted
0
Hi Yuk,
Let me know whether the suggested approach corresponds to your requirements.
Regards,
Maya
the Telerik team
May you try to set the TextWrapping property of the column to "Wrap" ? For example:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
TextWrapping
=
"Wrap"
Width
=
"100"
/>
Let me know whether the suggested approach corresponds to your requirements.
Regards,
Maya
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
Yuk
Top achievements
Rank 1
answered on 17 Jun 2011, 12:07 PM
It is a custom control with text and images.
_________
- size , icon
size, icon
__________
+ size , icon
___________
_________
- size , icon
size, icon
__________
+ size , icon
___________
0
Hi Yuk,
Maya
the Telerik team
In order to provide you with an appropriate solution, I would need a bit more details. What is the custom control that you are implementing ? Do you create your own custom column or you define a CellTemplate in column ?
Maya
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
Yuk
Top achievements
Rank 1
answered on 17 Jun 2011, 12:31 PM
<telerik:GridViewDataColumn SortMemberPath="Size" FooterTextAlignment="Right" >
<telerik:GridViewDataColumn.Header>
<ContentControl>
<StackPanel>
<TextBlock Text="Size ('000m)" HorizontalAlignment="Left" />
</StackPanel>
</ContentControl>
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Controls:CumtomSizeCell DataContext="{Binding SizeViewModel}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
public partial class CumtomSizeCell : UserControl
{
public CustomSizeCell()
{
InitializeComponent();
}
}
<telerik:GridViewDataColumn.Header>
<ContentControl>
<StackPanel>
<TextBlock Text="Size ('000m)" HorizontalAlignment="Left" />
</StackPanel>
</ContentControl>
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Controls:CumtomSizeCell DataContext="{Binding SizeViewModel}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
public partial class CumtomSizeCell : UserControl
{
public CustomSizeCell()
{
InitializeComponent();
}
}
0
Hello Yuk,
Maya
the Telerik team
Based on the code-snippets provided, I get the impression that you may still implement the suggested approach for setting the TextWrapping property of the column. Is it not appropriate for your case ? You might also have to set the Width property of the column so that it is aware towards which size it has to wrap the content.
Maya
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