locked
Customize "ListDetails" Template to use a subset of table columns RRS feed

  • Question

  • User701656190 posted

    For some tables in my DB, I need to customize the "ListDatails" Template to use only a subset of the table columns in the GridView and FormView. Please note I didn't mean just making the unwanted fields invisible on the UI. What I need is that those unwanted fields shouldn't be included in datasource and get posted back to DB.

    What's the best way to do the customization?

    Thanks,

    Thursday, December 19, 2013 10:23 AM

Answers

  • User-330204900 posted

    Hi Sheng Zeng, I'm not sure that is possilbe these are entities and if you send it back with null values then the properties will be made null. What I do is use my method here A New Way To Do Column Generation in Dynamic Data ... this hides the columns, they are never generated on the page and they are never updated. You will need to test to see if that will do what you want by checking with SQL Server Profiler.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 19, 2013 11:04 AM

All replies

  • User-330204900 posted

    Hi Sheng Zeng, I'm not sure that is possilbe these are entities and if you send it back with null values then the properties will be made null. What I do is use my method here A New Way To Do Column Generation in Dynamic Data ... this hides the columns, they are never generated on the page and they are never updated. You will need to test to see if that will do what you want by checking with SQL Server Profiler.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 19, 2013 11:04 AM
  • User701656190 posted

    Thank you Steve!

    Happy Christmas!

    Tuesday, December 24, 2013 1:01 PM