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

RadMultiColumnComboBox Localization Provider?

6 Answers 130 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Rahim
Top achievements
Rank 1
Rahim asked on 01 Aug 2012, 10:44 AM
Hi,

As we can localize RadGridView by using 
Telerik.WinControls.UI.Localization.RadGridLocalizationProvider
 and assigning it to 
RadGridLocalizationProvider.CurrentProvider
to change the text of certain elements on RadGridView by implementing our custom class
as follows:

Private Class MyEnglishRadGridLocalizationProvider
    Inherits Telerik.WinControls.UI.Localization.RadGridLocalizationProvider
 
    Public Overrides Function GetLocalizedString(ByVal id As String) As String
        Select Case id
            Case RadGridStringId.NoDataText
                Return "Between"
            Case RadGridStringId.AddNewRowString
                Return "Hey, you're new row here.."
            Case Else
                Return MyBase.GetLocalizedString(id)
        End Select
 
        Return "Bad, Bad Grid"
    End Function
End Class

Public Class Form1
     Public Sub New()
      ' This call is required by the Windows Form Designer.
        InitializeComponent()
        RadGridLocalizationProvider.CurrentProvider = New MyEnglishRadGridLocalizationProvider()
    End Sub
 End Class

Likewise, how can we localize gridview component embedded in RadMultiColumnComboBox?

Thanks

6 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 06 Aug 2012, 06:32 AM
Hello Rahim,

Thank you for writing.

RadMultiColumnComboBox internally holds RadGridView, so assigning the localization provider to the grid will also be reflected by  RadMultiColumnComboBox:
RadGridLocalizationProvider.CurrentProvider = New MyEnglishRadGridLocalizationProvider()

I hope this helps.

Kind regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Rahim
Top achievements
Rank 1
answered on 08 Aug 2012, 11:53 AM
Thanks for responding Stefan. 
Please find a screenshot attached. I want to change the "No Data to Display" text in my RadGridView component in RadMultiColumnComboBox.
How can I do it? Already tried the following:

Public Overrides Function GetLocalizedString(ByVal id As String) As String
    Select Case id
        Case RadGridStringId.NoDataText
            Return "Between"
        Case RadGridStringId.AddNewRowString
            Return "Hey, you're new row here.."
         Case Else
            Return MyBase.GetLocalizedString(id)
    End Select
     Return "Default Text Unavailable"
End Function


Regards,

Rahim
0
Stefan
Telerik team
answered on 13 Aug 2012, 05:46 AM
Hello Rahim,

This is the correct way to localize the desired text. Attached you can find a sample project and a screen shot of the result.

Alternative way is to set the text directly:
RadMultiColumnComboBox1.EditorControl.TableElement.Text = "Hello"

If the localization is still not working for you, could you please share with me, which version of RadControl for WinForms are you using?

I am looking forward to hearing from you.
 
Kind regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Rahim
Top achievements
Rank 1
answered on 13 Aug 2012, 09:00 AM
Hi Stefan, 

Sorry, I could not find attachments, neither could I find the TableElement property you referenced as an alternate solution.
RadMultiColumnComboBox1.EditorControl.TableElement.Text = "Hello"

We are using RadControls for WinForms Q1 2010 SP2 with VS 2005.

Also, you can witness from my last screenshot the localization mechanism works for AddNewRowString
but not working for "No data to display" text in the RadMultiComboBox GridView element. Any ideas?

Thanks
0
Accepted
Stefan
Telerik team
answered on 15 Aug 2012, 12:42 PM
Hello Rahim,

Please excuse me for omitting the attachment. It is now attached to this post, however it concerns our latest version. In your, localization of this property is not supported, neither TableElement exists. In 2010 we have performed major refactoring of this control and many new features and improvements were added. Feel free to upgrade to the latest version in order to take advantage of them.

Here is how to change this text in your version:
RadMultiColumnComboBox1.EditorControl.GridElement.Text = "text"

I hope this helps.
 
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Rahim
Top achievements
Rank 1
answered on 18 Aug 2012, 03:52 PM
Hello Stefan, 

Thank you! It works great.

Regards,
Rahim
Tags
MultiColumn ComboBox
Asked by
Rahim
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Rahim
Top achievements
Rank 1
Share this question
or