.DecoratedControls programmically (from string)

5 posts, 0 answers
  1. Zoinky
    Zoinky avatar
    45 posts
    Member since:
    Sep 2007

    Posted 09 Dec 2008 Link to this post

    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

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 10 Dec 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Zoinky
    Zoinky avatar
    45 posts
    Member since:
    Sep 2007

    Posted 10 Dec 2008 Link to this post

    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.
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 15 Dec 2008 Link to this post

    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.
  6. Zoinky
    Zoinky avatar
    45 posts
    Member since:
    Sep 2007

    Posted 16 Dec 2008 Link to this post

    thank you, all i wanted was the |= :)
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017