it's possible in some way to have a property that has an higher height? I've a complex object that compose the address of a customer, wish to have the possibility to show in a multiline then when clicking a button opening an edit window
Thanks
Paolo
6 Answers, 1 is accepted
In the current version of RadControls, the default style for PropertyGridField sets a fixed value to the Height property. Please, try setting an implicit style that sets the Height to "Auto", like this:
<
Style
TargetType
=
"telerik:PropertyGridField"
>
<
Setter
Property
=
"Height"
Value
=
"Auto"
/>
</
Style
>
Ivan Ivanov
the Telerik team
Can you please provide a simple example of an Editor Template that can support multiline (AccceptsReturn="True" etc) TextBox?
Thanks!
David,
<
Style
TargetType
=
"telerik:PropertyGridField"
>
<
Setter
Property
=
"Height"
Value
=
"NaN"
/>
</
Style
>
I am glad to hear that you found the most appropriate solution for your case.
As my colleague Ivan proposed you have to define a style targeted at PropertyGridField and set a Height, which is appropriate for your needs. Once you had a fixed height for this field you may set the AcceptsReturn property of the TextBox to True to get a multiline TextBox control.
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
Davids solution works great until I apply a Theme, at which point all the property sizes return to their default heights. Is there a way to apply a theme and still maintain the custom property height?
Thanks
Derek
It seems you are hitting a known limitation. Setting a theme other than the default tends to override the implicit styles. The workaround would be to set the property after applying the theme , e.g. in code behind.
Best wishes,
Pavel Pavlov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>