RadMultiColumnComboBox Localization Provider?

7 posts, 1 answers
  1. Rahim
    Rahim avatar
    4 posts
    Member since:
    Aug 2012

    Posted 01 Aug 2012 Link to this post

    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
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 06 Aug 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Rahim
    Rahim avatar
    4 posts
    Member since:
    Aug 2012

    Posted 08 Aug 2012 Link to this post

    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
  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 13 Aug 2012 Link to this post

    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 >>
  6. Rahim
    Rahim avatar
    4 posts
    Member since:
    Aug 2012

    Posted 13 Aug 2012 Link to this post

    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
  7. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 15 Aug 2012 Link to this post

    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 >>
  8. Rahim
    Rahim avatar
    4 posts
    Member since:
    Aug 2012

    Posted 18 Aug 2012 Link to this post

    Hello Stefan, 

    Thank you! It works great.

    Regards,
    Rahim
Back to Top
UI for WinForms is Visual Studio 2017 Ready