Different Language for <Description?

4 posts, 1 answers
  1. Rob
    Rob avatar
    59 posts
    Member since:
    Jan 2012

    Posted 30 Oct 2012 Link to this post

    Hi Guys

    I have used the Property Grid to present all the information about a 'record' that is stored in a Database.

    It's very nice and the customer likes it. Especially the part where we can define the <Description so the user gets to see a description of the parameter they are looking at.

    e.g

    <Description(

    "The number the Customer was ringing from"), _

     

    Category(

    "Contact Details")> _

     

    Public

     

    Property A_Nummer() As String

     


    However they now want multiple language support and I am struggling with how to handle difference languages for the property Desciption and Category Attributes. If I use any other than a fixed description , I get an error stating 'Constant Expression Required'

    At present I am looking at having to create separate classes for each language and loading a different class dependant on the langauge the user wants. I already have different classes dependant on what type of record the user selects to view, so then I need each of those in a different langauge that can be selected ( Yuk)

    It would be far easier to use the translate function I currently use to load the description text!

    Any ideas?

    Many thanks

    Rob

    Update, I have gone though the events looking for something that may allow me to reformat the text that is being displayed.. but havent worked out anything..
  2. Answer
    Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 02 Nov 2012 Link to this post

    Hello Rob,

    Thank you for writing.

    Please, find attached an example project where I have tried to reproduce your case. In the example I am using RadPropertyStore to hold the language information and to connect the RadPropertyGrid and the selected object.

    I hope this will be useful. Do not hesitate to write back with any further questions.
     
    Greetings,
    Ivan Petrov
    the Telerik team
    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Rob
    Rob avatar
    59 posts
    Member since:
    Jan 2012

    Posted 14 Nov 2012 Link to this post

    Hey Ivan

    I've been snowed and had this problem parked untill now, (in the 'get to it later' bin)

    Thankyou so much for taking the time do make this example.. you guys really do provide a fantastic service!

    Unfortunatly I am a lowly VB .NET coder and for some reason my VS 2008 wont load your example. My VS complained it cant find reference to microsoft.CSharp.    BUT I have managed to convert this and have it working.  ( yay for online converters)

    It's a great example and I've learnt allot from it.

    Thank you very much!

    Rob
  5. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 19 Nov 2012 Link to this post

    Hi Rob,

    Thank you for writing back.

    I am glad to hear the example was useful for you. Feel free to open a new thread if you have other questions or write in this one if you have questions related to the current topic.

    All the best,
    Ivan Petrov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top