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

Different Language for <Description?

3 Answers 82 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
Rob asked on 31 Oct 2012, 03:35 AM
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..

3 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Petrov
Telerik team
answered on 02 Nov 2012, 02:33 PM
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.
0
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 15 Nov 2012, 12:43 AM
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
0
Ivan Petrov
Telerik team
answered on 19 Nov 2012, 10:18 AM
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.
Tags
PropertyGrid
Asked by
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Ivan Petrov
Telerik team
Rob
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or