Hello,
I have pretty much the same problem describe in that post : http://www.telerik.com/community/forums/wpf/gridview/rowdetailstemplate-and-text-wrapping.aspx .
Inside my RowDetails I have a control with some textblocs (set to warp). I dont want the horizontal scrollbar, to make my textblock warp.
The difference with the previous link is that I dont want to set the RadGridView width to a constant value. (to follow the window size)
I want the RowDetails width to be the same as the RadGridView width. I've set the ScrollViewer.HorizontalScrollBarVisibility
So I tried to bind the MaxWidth of my control inside the RowDetails value with RadGridView but it doesnt work (textblocs don't warp and horizontal scrollbar is still on)
this is my code :
Thanks for your help!
Regards.
I have pretty much the same problem describe in that post : http://www.telerik.com/community/forums/wpf/gridview/rowdetailstemplate-and-text-wrapping.aspx .
Inside my RowDetails I have a control with some textblocs (set to warp). I dont want the horizontal scrollbar, to make my textblock warp.
The difference with the previous link is that I dont want to set the RadGridView width to a constant value. (to follow the window size)
I want the RowDetails width to be the same as the RadGridView width. I've set the ScrollViewer.HorizontalScrollBarVisibility
= to
"Disabled"
So I tried to bind the MaxWidth of my control inside the RowDetails value with RadGridView but it doesnt work (textblocs don't warp and horizontal scrollbar is still on)
this is my code :
<
telerikGrid:RadGridView
x:Name
=
"MRUList"
ItemsSource
=
"{Binding MRUSupplierItems, Mode=TwoWay}"
SelectedItem
=
"{Binding CurrentSelectedSupplierItem, Mode=TwoWay}"
Grid.Row
=
"1"
d:LayoutOverrides
=
"Width"
VerticalAlignment
=
"Top"
IsSynchronizedWithCurrentItem
=
"True"
RowIndicatorVisibility
=
"Collapsed"
ShowGroupPanel
=
"False"
IsFilteringAllowed
=
"False"
AutoGenerateColumns
=
"False"
CanUserInsertRows
=
"False"
RowDetailsVisibilityMode
=
"Collapsed"
IsReadOnly
=
"True"
CanUserDeleteRows
=
"True"
CanUserFreezeColumns
=
"False"
Margin
=
"2,2,2,0"
ScrollViewer.HorizontalScrollBarVisibility
=
"Disabled"
>
<
telerikGrid:RadGridView.Columns
>
<
telerikGrid:GridViewDataColumn
Header
=
"{Binding Resource.GridTitleBrandName, Source={StaticResource Resource}}"
UniqueName
=
"PriceList_Name"
DataMemberBinding
=
"{Binding PriceList_Name}"
IsSortable
=
"True"
/>
<
telerikGrid:GridViewDataColumn
Header
=
"{Binding Resource.GridTitleProductRef, Source={StaticResource Resource}}"
UniqueName
=
"Reference"
DataMemberBinding
=
"{Binding Reference}"
IsSortable
=
"True"
/>
<
telerikGrid:GridViewDataColumn
Header
=
"{Binding Resource.GridTitleProductName, Source={StaticResource Resource}}"
Width
=
"*"
UniqueName
=
"Name"
DataMemberBinding
=
"{Binding Name}"
IsSortable
=
"True"
/>
<
telerikGrid:GridViewDataColumn
Header
=
"{Binding Resource.GridTitleProductPrice, Source={StaticResource Resource}}"
UniqueName
=
"Price"
DataMemberBinding
=
"{Binding PublicPrice}"
IsSortable
=
"True"
/>
</
telerikGrid:RadGridView.Columns
>
<
telerikGrid:RadGridView.RowDetailsTemplate
>
<
DataTemplate
x:Name
=
"RowDetailsProvider"
>
<
local:SupplierItemUserControl
MaxWidth
=
"{Binding Width, ElementName=MRUList}"
AddItemToQuotationCommand
=
"{Binding ElementName=ElytecMRUUC, Path=DataContext.AddItemToQuotationCommand, Mode=TwoWay}"
AddItemToCartCommand
=
"{Binding ElementName=ElytecMRUUC, Path=DataContext.AddItemToCartCommand, Mode=TwoWay}"
DisplayAddToCart
=
"True"
DisplayAddToQuotation
=
"{Binding IsCurrentQuotationAvailable, Mode=OneWay}"
DisplayRemoveFromCart
=
"False"
/>
</
DataTemplate
>
</
telerikGrid:RadGridView.RowDetailsTemplate
>
</
telerikGrid:RadGridView
>
Thanks for your help!
Regards.