Add hint to field for every table

Last post 01-06-2008 11:59 AM by davidebb. 3 replies.

Sort Posts:

  • Add hint to field for every table

    01-06-2008, 12:39 AM
    • Member
      110 point Member
    • txghia58
    • Member since 04-19-2005, 7:05 PM
    • Posts 30

    I was just watching this very nice video on David's blog and had a few questions.

    In it he shows how to give a hint so that a particular collumn for the products table shows with a tumbs up of thumbs down. I was wondering if there was a method to where it would not only apply to the products table but for every table as long as the column name was exactly the same. I can see how it can get real tedious having to put hints in ver every phone, email, fax field in a database.

    Is this just something that I am missing? 

     Here is the vid I was refering to. http://blogs.msdn.com/davidebb/archive/2007/12/12/dynamic-data-screencast-is-now-available.aspx

    Filed under:
  • Re: Add hint to field for every table

    01-06-2008, 3:09 AM
    • Contributor
      5,791 point Contributor
    • davidebb
    • Member since 06-11-2002, 8:31 AM
    • Redmond, WA
    • Posts 1,161
    • AspNetTeam

    That's an interesting idea.  Though I should say I'm not convinced that making the decision based on the column name is a good idea, since the exact name may vary from table to table.  e.g phone number columns may be named HomeNumber, WorkNumber, etc...  In a perfect world, if the database itself knew that those columns were phone numbers and Dynamic Data could pick it up, it could just work for free.  But in practice, there is no such thing, so I'm not sure if there is a good reliable way to avoid marking each individual column with the hint.

    thanks,
    David

  • Re: Add hint to field for every table

    01-06-2008, 10:55 AM
    • Member
      110 point Member
    • txghia58
    • Member since 04-19-2005, 7:05 PM
    • Posts 30

    So it looks like I will be exploring the budy system and a method to automagicaly generate the XML from a data table.

    Thanks for the quick reply.

  • Re: Add hint to field for every table

    01-06-2008, 11:59 AM
    Answer
    • Contributor
      5,791 point Contributor
    • davidebb
    • Member since 06-11-2002, 8:31 AM
    • Redmond, WA
    • Posts 1,161
    • AspNetTeam

    You may be able to make this work with a custom metadata provider.  Make sure you check out this article which explains how to do this.

    David

Page 1 of 1 (4 items)