Last post Oct 12, 2012 10:45 AM by sjnaughton
Oct 11, 2012 04:36 AM|JaggerTh|LINK
Is it possible, to limit number of datafields in generic List.aspx page (e.g. via a querystring-parameter), but leave Details and Edit/Insert unaffected?
I have a Datatable, that have many fields and the standard - List.aspx - implementation shoes all fields,
although this is not necessary in this case ...
Thanks for your hints!
Oct 11, 2012 09:17 AM|sjnaughton|LINK
Hi Thomas, you could write a custopm IAutoFieldGenerator for this and passing the field list. I have some examples on my blog.
Oct 11, 2012 10:44 AM|JaggerTh|LINK
Thank you for your quick response! I had a firts quick look at your blog and think, this is the right way.
I have to
1) implement a new Autofieldgenerator , which uses given Fields to generate Gridcolumns
2) Look, if a Fieldlist is in querystring avalaible
if yes: then use new Autofieldgenerator
if not: us original Autofieldgenerator
For your understanding:
I want to use web.sitemap to call e.g:
<siteMapNode title="News" url="~/Admin/News/List.aspx?ListFields=NewsDate|ShortDescription|Longdescription" />
So in the resulting gridview only these 3 Columns should be listet, but in Edit/Insert/details mode all fields should be available.
I think, this takes me a litle time, but I see clearer now and think this is the right way!
Oct 12, 2012 10:45 AM|sjnaughton|LINK
Hi Thomas, yes that is correct :)