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

Cell data terminated with "..."

1 Answer 55 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
JC
Top achievements
Rank 1
JC asked on 05 Apr 2012, 07:48 AM
How do I show the cell content terminated with "..." if its length is longer than the cell width. Tool tip to show all the content.

Is that possible? Pls help.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 05 Apr 2012, 08:07 AM
Hello,

 The easiest way yo achieve your goal is to define a custom CellTemplate for desired column and set both requirements on a TextBlock. Here is an example:

<telerik:GridViewDataColumn Width="100" DataMemberBinding="{Binding Description}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Description}" 
                                       TextTrimming="WordEllipsis"
                                       ToolTipService.ToolTip="{Binding Description}" />

                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>

You should have also fixed width for the column if you want trimming!

I would like to kindly ask you also to keep our conversions in single place - no need to open forum post and support ticket for the same question. Usually forums are better since more people will benefit!

Regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
TreeListView
Asked by
JC
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or