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

Splitting hairs. Or words.

4 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 17 Jun 2016, 01:37 PM

Hi,

 

The grid column headers split the view model property names when there is an uppercase character in the viemodel property name. That is good. But when I have an non-English character in the name the column header will also be split. Is this the intended behaviour? I know I can workaround the issue by using DisplayName in the model or .Title() in the grid, but that is a lot of unnecessary work.

ViewModel:

    public class AvslagnaIndexViewModel
    {
        public Guid Id { get; set; }
        public string DiarieNummerSSM { get; set; }
        public DateTime AnsökningsDatum { get; set; }
        public string Handläggare { get; set; }
        public string ExportörNamn { get; set; }
        public string SlutanvändareNamn { get; set; }
        public string BestämmelseLandNamn { get; set; }
        public string Status { get; set; }
    }

Grid columns:
        .Columns(columns =>
        {
            columns.Bound(p => p.Id).Hidden().Title("Id");
            columns.Bound(p => p.DiarieNummerSSM).ClientTemplate(
                Html.ActionLink("#=DiarieNummerSSM#", "Details", "Avslagna", new { id = "#=Id#" }, new { title = "Visa ärendedetaljer", @class = "k-link k-grid-edit-row" }).ToHtmlString()).Width(120);
            columns.Bound(p => p.AnsökningsDatum).Format("{0:yyyy-MM-dd}");
            columns.Bound(p => p.Handläggare);
            columns.Bound(p => p.ExportörNamn);
            columns.Bound(p => p.SlutanvändareNamn);
            columns.Bound(p => p.BestämmelseLandNamn);
            columns.Bound(p => p.Status);
        })

See the attached image for the result. All words containing non-English caracters are split in more places than they should be. As you can see "BestämmelseLandNamn" is shown as "Bestä mmelse Land Namn"

Best regards,

Henrik

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 21 Jun 2016, 12:17 PM
Hello Henrik,

The automatic split functionality works on the server and I'm afraid there is no workaround, other than using Title. I will see if we can get this fixed for a future version, but at this point you are better off setting the title manually for fields that contain characters in different cultures.

Regards,
Daniel
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
Henrik
Top achievements
Rank 1
answered on 21 Jun 2016, 12:45 PM

Hi Thanks for the response,

I am not sure what you mean when you say "different cultures". We have only one culture (sv-SE) set globally in the application and it works for formatting numbers etc.

Should I set the culture specifically for this grid?

Best regards,

 

Henrik

0
Accepted
Daniel
Telerik team
answered on 21 Jun 2016, 01:57 PM
Hi Henrik,

By different culture, I meant a culture different than English. To put the long story short, this functionality (automatic text splitting) won't work as expected if the properties in your model are named with characters which are not part of the English alphabet, no matter if you have set the culture to the widget or somewhere else.

Regards,
Daniel
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
Henrik
Top achievements
Rank 1
answered on 21 Jun 2016, 02:15 PM

OK, thanks.

 

Let's hope you can get this fixed in a release soon, there are other languages than English out there.I can't be the only one with this problem.

 

Best regards,

Henrik

Tags
Grid
Asked by
Henrik
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Henrik
Top achievements
Rank 1
Share this question
or