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

GridViewRowElement localization

6 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Valery
Top achievements
Rank 1
Veteran
Valery asked on 06 Nov 2018, 09:48 AM
How to localize GridViewRowElement?

6 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Nov 2018, 10:00 AM
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.
0
Valery
Top achievements
Rank 1
Veteran
answered on 07 Nov 2018, 04:37 AM
If in the RadGridView I choose “Conditional formatting” in the context menu, then not all elements can be localized.
0
Valery
Top achievements
Rank 1
Veteran
answered on 07 Nov 2018, 07:12 AM

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?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Nov 2018, 09:54 AM
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.
0
Valery
Top achievements
Rank 1
Veteran
answered on 07 Nov 2018, 12:13 PM
How to fix the localization for "MiddleLeft" (see Localization.png)?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Nov 2018, 12:22 PM
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.
Tags
GridView
Asked by
Valery
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Valery
Top achievements
Rank 1
Veteran
Share this question
or