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

No text warping inside kendo react grid column for extra text i want to display three dot (...)

4 Answers 1446 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mukesh
Top achievements
Rank 1
Mukesh asked on 31 Jul 2019, 11:28 AM

No text warping inside kendo react grid column for extra text i want to display three dot (...) 

We have requirement of showing three dots (...) if size of the text increases the given width. Is there way to do that.

Please provide an example.

4 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 02 Aug 2019, 11:28 AM
Hi Mukesh,

Please examine the following example: https://stackblitz.com/edit/react-mdfhd6?file=app/main.jsx.

The 'CategoryName' column title is too long and can not fit in the header cell. You can see that the three dots appear and this is the default behavior.

If this is not the case or does not help, can you provide more details about your scenario?

Regards,
Nikolay
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Mukesh
Top achievements
Rank 1
answered on 02 Aug 2019, 01:58 PM

I do not mean that for header which get handle automatically.

I want that behavior for data which is being warped. Instead of being wrapped i want three dots. 

0
Arun
Top achievements
Rank 1
answered on 06 Aug 2019, 02:39 AM

YOu can do this if you like.

 

https://stackblitz.com/edit/react-mdfhd6?file=app/main.jsx

 

But this example takes into account that the length of the text is more than 10, then add ... else render the value

0
Stefan
Telerik team
answered on 06 Aug 2019, 07:02 AM
Hello, Mukesh,

This can be done by adding the following CSS rule to the TD elements of the Grid:

.k-grid td {
  white-space: nowrap
}


Please notice the end result, observable in the Name column:

https://stackblitz.com/edit/react-mdfhd6-qcs5fz?file=index.html


Regards,
Stefan
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mukesh
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Mukesh
Top achievements
Rank 1
Arun
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or