locked
Change the UIHint for a column at runtime RRS feed

  • Question

  • User-292752494 posted

    Hi ... I face a Medias table contains the Url column, I wanna change the UIHint attribute depend on the album types: Audio, Video or Image. Is there a way to change the attribute value at runtime. I solve the issue using switch visiblity of the controls in the same FieldTemplate, but i'm lookng for better solution if it's possible ..

    Sunday, December 23, 2012 8:47 PM

Answers

  • User-292752494 posted

    Finally I did it ..

    I Declare the DynamicFiled inside List page and set the UIHint property using inline condition, problem solved!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 25, 2012 9:21 AM
  • User-292752494 posted

    Hi sjnaughton ...

    Also I solve it by creating a simple condition in the EntityTemplate ..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 28, 2012 5:17 PM

All replies

  • User3866881 posted

    I solve the issue using switch visiblity of the controls in the same FieldTemplate, but i'm lookng for better solution if it's possible ..

    Hi,

    First many thanks for sharing us a nice solution!

    Then if you wanna dynamically change the Attribute……Hum, As far as I see, Because dynamic data has been totally fixed and there's a complicated function to analyze and reflect the whole Attributes, I'm afraid it's hard to do to cope with that.

    Monday, December 24, 2012 8:08 PM
  • User-292752494 posted

    Thank Decker ..

    I find a way to add attributes in the entities at runtime then register them in Global.asax, but I tried a lot to do the same thing in the code behind with no luck!! coz in the Application_Start dynamic data scaffold the entities and reflect the whole attributes ..

    I 'll struggle to come up with a better solution ..

    Tuesday, December 25, 2012 6:49 AM
  • User-292752494 posted

    Finally I did it ..

    I Declare the DynamicFiled inside List page and set the UIHint property using inline condition, problem solved!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 25, 2012 9:21 AM
  • User3866881 posted

    Finally I did it ..

    I Declare the DynamicFiled inside List page and set the UIHint property using inline condition, problem solved!!

    Congratulation to share your problem solution!

    I'll close your issue, if anything urgent, please feel free to feedback.

    Tuesday, December 25, 2012 8:19 PM
  • User-330204900 posted

    Hi Hisham, good solution I was going to say you would be best usign a custom page.

    Thursday, December 27, 2012 5:42 AM
  • User-292752494 posted

    Hi sjnaughton ...

    Also I solve it by creating a simple condition in the EntityTemplate ..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 28, 2012 5:17 PM