Dynamic Control SelectedIndexChange

Last post 02-05-2009 9:18 AM by sjnaughton. 1 replies.

Sort Posts:

  • Dynamic Control SelectedIndexChange

    02-05-2009, 3:46 AM
    • Member
      569 point Member
    • Deepesh
    • Member since 07-21-2006, 7:31 AM
    • Posts 128

    We have a Insert page with DetailView and we have a DropDown which is bind with different table. Now we want to hide some fields on the selection which user has selected in the dropdown. We are not able to get SelectedIndexChanged Event of the DynamicDataControl which have a dropdownlist. Is there any way to achive this.

    Dont forget to click “Mark as Answer” on the post that helped you.
    This credits that member, earns you a point and mark your thread as Resolved for the sake of Future Readers.
  • Re: Dynamic Control SelectedIndexChange

    02-05-2009, 9:18 AM
    Answer
    • Star
      12,112 point Star
    • sjnaughton
    • Member since 04-29-2008, 5:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,535
    • TrustedFriends-MVPs

    My first thought would be to create a IAutoFieldGenerator and then an attribute that takes an array of string values representing the values from the DDL that would hide the field that it was applied to. Then in the IAutoFieldGenerator I would get the value from the FieldTemplate see my Dynamic Data – Cascading FieldTemplates on my blog for how I got values out of dependee FieldTemplate using this value I would then check each field to see if it had the attribute and if so was the value there to hide it see Dynamic Data - Hiding Columns in selected PageTemplates for a similar implementation. Hope that made sense if not it may be worth doing a post on my blog.

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
Page 1 of 1 (2 items)