Splitting hairs. Or words.

5 posts, 1 answers
  1. Henrik
    Henrik avatar
    11 posts
    Member since:
    Nov 2015

    Posted 17 Jun Link to this post

    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

  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 21 Jun Link to this post

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Henrik
    Henrik avatar
    11 posts
    Member since:
    Nov 2015

    Posted 21 Jun in reply to Daniel Link to this post

    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

  5. Answer
    Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 21 Jun Link to this post

    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
  6. Henrik
    Henrik avatar
    11 posts
    Member since:
    Nov 2015

    Posted 21 Jun in reply to Daniel Link to this post

    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

Back to Top
UI for ASP.NET MVC is VS 2017 Ready