GridViewRowElement localization

7 posts, 0 answers
  1. Valery
    Valery avatar
    65 posts
    Member since:
    May 2011

    Posted 06 Nov 2018 Link to this post

    How to localize GridViewRowElement?
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3759 posts

    Posted 06 Nov 2018 Link to this post

    Hello, Valery, 

    According to the provided brief description, it is not clear enough what is the exact requirement that you are trying to achieve. To localize RadGridView to display control text and messages in a specific language, it is necessary to create a custom RadGridLocalizationProvider. A sample approach is demonstrated in the following help article: https://docs.telerik.com/devtools/winforms/gridview/localization/localization

    If it is not the exact requirement, please specify in details what is the exact goal that you are trying to achieve. Thus, we would be able to assist you further. Thank you in advance.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Valery
    Valery avatar
    65 posts
    Member since:
    May 2011

    Posted 06 Nov 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    If in the RadGridView I choose “Conditional formatting” in the context menu, then not all elements can be localized.
  4. Valery
    Valery avatar
    65 posts
    Member since:
    May 2011

    Posted 07 Nov 2018 in reply to Valery Link to this post

    1. RadGridView lozalization has not localization for conditional formating for CellFront and RowFront.
    2. Conditional Formatting Rules Manager window is too narrow, that even english text  doesn`t feet. User can`t change size of the window.
    We localize our product in russian. Russian words are made up of many letters.

    How to resize this window?

  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3759 posts

    Posted 07 Nov 2018 Link to this post

    Hello, Valery, 

    According to the provided screenshot, I suppose that you are using the TelerikMetroBlue theme. Indeed, the ConditionalFormattingForm's width should be increased in order to avoid clipping the text.

    I have logged it in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

    I have also updated your Telerik points.

    Currently, the possible solution that I can suggest is to handle the ConditionalFormattingFormShown event  and increase the width: 

    private void radGridView1_ConditionalFormattingFormShown(object sender, EventArgs e)
    {
        ConditionalFormattingForm f = sender as ConditionalFormattingForm;
        if (f != null)
        {
            f.Width += 5;
        }
    }

    As to the missing localization strings, I logged an issue as well and it will be added in the next official release. Here is the feedback item for your reference: https://feedback.telerik.com/Project/154/Feedback/Details/258919-fix-radgridview-missing-localization-strings-for-the-cellfont-rowfont-in-the-c

    Feel free to use the suggest approach in the feedback in order to change the title of the property.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. Valery
    Valery avatar
    65 posts
    Member since:
    May 2011

    Posted 07 Nov 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    How to fix the localization for "MiddleLeft" (see Localization.png)?
  7. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3759 posts

    Posted 08 Nov 2018 Link to this post

    Hello, Valery, 

    The "MiddleLeft" string actually represents a value from the ContentAlignment enum. In order to change the value's text that is displayed in the property grid, you can use the ContentAlignment.ItemFormatting event and change the text as follows:

    private void radGridView1_ConditionalFormattingFormShown(object sender, EventArgs e)
    {
        ConditionalFormattingForm f = sender as ConditionalFormattingForm;
        if (f != null)
        {
            RadPropertyGrid radPropertyGridProperties = f.Controls["radPropertyGridProperties"] as RadPropertyGrid;
            radPropertyGridProperties.ItemFormatting -= radPropertyGridProperties_ItemFormatting;
            radPropertyGridProperties.ItemFormatting += radPropertyGridProperties_ItemFormatting;
        }
    }
     
    private void radPropertyGridProperties_ItemFormatting(object sender, PropertyGridItemFormattingEventArgs e)
    {
        PropertyGridItemElement visualItem = e.VisualElement as PropertyGridItemElement;
         
        if (visualItem != null)
        {
            if (visualItem.ValueElement.Text == "MiddleLeft")
            {
                visualItem.ValueElement.Text = "aaa";
            }
        }
     
        if (e.Item.Label == "CellFont")
        {
            e.Item.Label = "aaa";
        }
    }

    Should you have further questions please let me know.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top