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

RTL in a single column

2 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
Rob asked on 18 Aug 2020, 11:42 PM

Hey Guys

I want to render 1 column ( 1 that shows a file with the complete path) with the filename always showing and the rest of the path hidden to the left when the column is not wide enough.

Adding the htmlAttribute to set the direction works.. except that the '\\' at the start of the path seems to get moved to the end of the path 

c.Bound(Function(p) p.filename).Title("Filename").HtmlAttributes(New With {.style = "direction: rtl;"})
c.Bound(Function(p) p.info).Title("Info").Width(10)
c.Bound(Function(p) p.filename).Title("Filename")

 

To demonstrate, I have added the Filename column twice. First one using 'rtl' , the 2nd regular not to show what I am talking about. This is shown in the attached screen shot. 
I also tried implementing this as a Client Template and I get the same issue.

Any suggestions greatly appreciated.

Rob

2 Answers, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 18 Aug 2020, 11:54 PM
Thought I should add a screen shot of what I am trying to achieve .. (However this has the '\\' at the end of the path)
0
Petar
Telerik team
answered on 20 Aug 2020, 12:05 PM

Hi Rob,

Attached to my reply, you will find a runnable example that demonstrates how we can implement the targeted functionality using the following CSS code.

#grid > div.k-grid-content> table > tbody > tr > td:nth-child(4){
    white-space:nowrap;
    overflow: hidden;
    text-overflow: ellipsis;  
    direction: rtl;
    text-align: left;
}

In the context of the attached example, the column which ellipsis we are moving to the front of the string is the fourth one and this is why the marked in yellow value above is '4'. You will have to modify this value in your project. 

Check the attached example and let me know if it helps you implement the targeted functionality in your application.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
Petar
Telerik team
Share this question
or