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

.DecoratedControls programmically (from string)

4 Answers 125 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Zoinky
Top achievements
Rank 1
Zoinky asked on 10 Dec 2008, 02:54 AM

given that there is some performance issues (I will make a seperate post for this),

i decided to make decoration of controls user controlled, in otherwords i let the user of my app decide which controls they want decorated, i basically save a string comma seperated to db and read it back, however I am not sure how to translate these strings (multiple) into FormDecoreatedControls enums
basically in short i have a string.. "Label,TextBox,Default,Fieldset,H4H5H6,RadioButtons,Scrollbars,TextArea"
i want to programmically set this for the form decorated control.

thanks

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 10 Dec 2008, 03:24 PM
Hi Zoinky,

You can set the enum values as string only in the RadFormDecorator's declaration in the ASPX. To do the same on the server, you need to convert the string. This is a general programming task that is not related to the RadFormDecorator control. There are various resources on the net that show how to do this - for example you can check the following blog:
http://blogs.msdn.com/tims/archive/2004/04/02/106310.aspx


Kind regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Zoinky
Top achievements
Rank 1
answered on 10 Dec 2008, 05:26 PM
while it is true this has nothing to do with telerik persay, i could not find a single resource that tells me how to create a COLLECTION of enums bitmasks, translating a single string into a single enum is no problem(as you provided the link), its creating a collection of them and assigning it, programically.
any help would be appreciated.
0
Georgi Tunev
Telerik team
answered on 15 Dec 2008, 04:01 PM
Hi Zoinky,

I've attached a small sample that shows how to do this. Please examine the code and use it as a base in your implementation.
If you still experience problems with this task, please check the MSDN library for additional information on how to work with enums.



All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Zoinky
Top achievements
Rank 1
answered on 16 Dec 2008, 05:52 PM
thank you, all i wanted was the |= :)
Tags
FormDecorator
Asked by
Zoinky
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Zoinky
Top achievements
Rank 1
Share this question
or