Last post Nov 09, 2010 08:29 AM by sjnaughton
Nov 17, 2008 04:11 AM|tqv9680|LINK
Hello every one,
I were tried so hard with no luck in showing different fields in List form then in the Edit form.
for example, i created a table with 20 columns, but i just want to list less than 10 fields in the list view form while all fields are required to visible in the edit form. How could i do that ?
Nov 17, 2008 06:33 AM|sjnaughton|LINK
If I understand you correctly I think I have already done what you want have a look at this on my blog
Dynamic Data - Hiding Columns in selected PageTemplates
Hope this helps [:D]
Hide Column based on page
Nov 17, 2008 03:34 PM|ricka6|LINK
There is no built in way for Dynamic Data to show fields in some templates but not others - but this is planned for the next release. In the mean time
Steve's blog will give you an approach.
Nov 17, 2008 04:18 PM|PLBlum|LINK
I must be missing something because this sounds like the purpose of the CustomPages folder. Suppose your table is "Products", you would create this path: ~/DynamicData/CustomPages/Products.
Then copy the List.aspx and Edit.aspx web forms from the ~/DynamicData/PageTemplates to the new folder.
Finally, edit List.aspx and Edit.aspx to make their GridView and DetailsView define the exact list of desired columns in the <Columns> property using DynamicField controls.
Nov 17, 2008 05:43 PM|ricka6|LINK
You haven't missed anything. The CustomPages approach will certainly solve the problem, but it's a lot of work. For the next release we will have an attribute (something like the following):
With that attribute, you can specify the entities that will display/hide columns. Much less work.
Nov 09, 2010 07:48 AM|asapjim|LINK
Hi, did this functionality make it into a release? Or is there another way to do this?
Dyamic Data 4 scaffold
Nov 09, 2010 08:29 AM|sjnaughton|LINK
Hi Asapjim, no it didn't but have a look at my sample here
My new way to do column generation support my old HideColumnIn attribute.
Dynamic Data 4