This is a migrated thread and some comments may be shown as answers.

GridViewDataColumn set implicit style

3 Answers 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mats
Top achievements
Rank 1
Mats asked on 17 Feb 2020, 12:29 PM

Hi,

I have troubles to set a implicit style to GridViewDataColumn.

 

For all grid view columns i want to set the style to without

- TextTrimming="CharacterEllipsis"

- TextWrapping="WrapWithOverflow"

 

I tried with  <Style TargetType="telerik:GridViewDataColumn" BasedOn="{StaticResource GridViewDataColumnStyle}">

 

Any suggestions?

Thank you in advance

3 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 20 Feb 2020, 09:04 AM

Hi Mats,

There is no specific style that targets GridViewDataColumn so you can remove the BasedOn property.

<Style TargetType="telerik:GridViewDataColumn" >
    <Setter Property="Width" Value="200"/>
    <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
    <!--<Setter Property="TextWrapping" Value="WrapWithOverflow"/>-->
</Style>

Give it a try and let me know if it works for you. Also, when the TextWrapping is set to WrapWithOverflow, the TextTrimming property will be ignored.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Mats
Top achievements
Rank 1
answered on 20 Feb 2020, 09:53 AM

Dinko thank you for your answer.

Your suggestion worked out for me!

 

 

[quote]Also, when the TextWrapping is set to WrapWithOverflow, the TextTrimming property will be ignored.[/quote]

This is not true. WrapWithOverflow will wrap overflow words if possible. But when no more words to wrap it uses TextTrimming

 

Regards,

Mats


0
Dinko | Tech Support Engineer
Telerik team
answered on 24 Feb 2020, 10:52 AM

Hello, Mats,

I am happy to hear that the suggested approach works for you. Thank you for elaborating on this behavior. I have overlooked that, and accept my apologies.

If you have any other questions you can open a new forum thread with your questions inside.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Mats
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Mats
Top achievements
Rank 1
Share this question
or