File dialogs: the width of the file name is limited

1 Answer 30 Views
FileDialogs
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 14 Jun 2022, 03:01 PM

Hello,

I've replicated, at least, this error when using the List view: when file names are too long, they are truncated (with ...) and there is no way to widen the field. This is very annoying when files with similar long names are displayed in the control.

It's also different to how Windows Explorer works.

Regards

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 17 Jun 2022, 02:32 PM

Hello Patrick,

The files and directories in the list view are placed in a VirtualizingWrapPanel which has an ItemWidth of 230 pixels. This property needs to be set for virtualization to be enabled, but you can set it to an arbitrarily large number to hold items with a longer name. For this to be achieved, the control template of the ExplorerControl has to be extracted, and more specifically, the DataTemplate for the ListDataTemplate property of its LayoutConfiguratorTemplateSelector has to be modified. 

For your convenience, I have prepared a sample project that has the above-shared suggestion's implemented, so, could you give it a try?

Regards,
Stenly
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/.

Patrick
Top achievements
Rank 2
Iron
Iron
Iron
commented on 17 Jun 2022, 02:49 PM

Hello Stenly,

Thanks for your answer.

As usual: extract the control template, correct it and use the corrected one. I've often received this kind of answer...

What you don't take into account is that, if I count every time I have received this kind of answer, I have more than 10 custom templates to maintain. Multiply by, currently, 4 themes I use, so I will have about 50 custom templates. Now, there are usually 6 updates per year, so it means that I have about 300 templates to check and correct each year.

This is perhaps a solution for a big company with developpers that work only for UI, but it's not doable for a single self-employed developper.

In addition, the solution is not perfect: as I don't know in advance the length of the file names, which size sould I use? There are sometimes files with very long names. So a solution where the width depends of the file names in the folder would be the only true solution.

What you can easily do is to add a tooltip that displays the full file name in case it is truncated. That will be a workaround until a correct solution is found.

There exists a VirtualizingWrapPanel repository in GitHub, that seems to do the trick correctly, so I think you can also implement a VirtualizingWrapPanel that accepts a width that depends on the content...
GitHub link: https://github.com/sbaeumlisberger/VirtualizingWrapPanel
Example use: https://docs.microsoft.com/en-us/answers/questions/407291/how-to-correctly-implement-virtualizingwrappanel-i.html

Best regards

Stenly
Telerik team
commented on 22 Jun 2022, 02:39 PM

I have created a sample project, which shows how to display a tooltip when the mouse is over a RadListBoxItem element (these elements are used in some of the views). The application is attached to this comment.

Concerning the matter at hand, I have logged a new bug report in our feedback portal. The item could be voted for and followed, to receive an e-mail when its status gets changed.

Furthermore, I have also updated your Telerik points as a gesture of gratitude for bringing this to our attention.

Petar Mladenov
Telerik team
commented on 09 Sep 2022, 11:09 AM

Hi Patrick,
In your last comment, you mention that tooltip is workaround, however, we can see in the MS Windows Dialogs (Open/SaveAs) that tooltip is the only solution in this scenario. Could you please let us know if you have seen a better solution in the MS Dialogs. Changing the WrapPanel is really trick as it might hurt the virtualization/srolling performance.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
commented on 09 Sep 2022, 03:02 PM

Hi Petar,

In the MS Windows Dialog, when using the "List" display, the columns are automatically resized, depending on the width of the text in them. In the "Details" display, the size of the column can be manually changed.

Petar Mladenov
Telerik team
commented on 12 Sep 2022, 10:56 AM

Thank you for bolding these features, Patrick.
Petar
Top achievements
Rank 1
commented on 13 Sep 2022, 08:47 AM

Hi Patrick, 
Just to add a quick note regarding resizing grid columns in Details mode  - this is an available option in our Dialogs as well as in the standalone ExplorerControl too.
Tags
FileDialogs
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or