locked
Configure numer of datafields in List.aspx via QueryString RRS feed

  • Question

  • User-1033738947 posted

    Hello Again!

    Another question:

    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!

     

     

    Thursday, October 11, 2012 4:36 AM

Answers

  • User-330204900 posted

    Hi Thomas, you could write a custopm IAutoFieldGenerator for this and passing the field list. I have some examples on my blog.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 11, 2012 9:17 AM
  • User-1033738947 posted

    Hello!

    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!

    Thanks!

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 11, 2012 10:44 AM

All replies

  • User-330204900 posted

    Hi Thomas, you could write a custopm IAutoFieldGenerator for this and passing the field list. I have some examples on my blog.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 11, 2012 9:17 AM
  • User-1033738947 posted

    Hello!

    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!

    Thanks!

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 11, 2012 10:44 AM
  • User-330204900 posted

    Hi Thomas, yes that is correct :)

    Friday, October 12, 2012 10:45 AM