Mastering SharePoint

Where to put code that uses ListFieldIterator for a list?

Latest post Sun, Nov 16 2008 2:16 AM by Bob Mixon. 3 replies.
  • Fri, Oct 31 2008 4:29 PM

    Where to put code that uses ListFieldIterator for a list?

     

    Hi,

    I have a requirement for a cascading dropdown on a list. Here is the scneario, solution and question:

    Scenario:
    - Requirements is to maintain a list of products.
    - Each product has 15 metadata field, Among them are Type, SubType and Category.
    - The above 3 types are needed to be as cascading dropdown when creating a new list item for products.

    Solution:
    - Have a custom ASP.NET form using ListFieldIterator for creating new item in Products list with Cascading dropdowns for Type -> SubType -> Category instead of static ones.

    Question:
    - Where do I put the code that I have created using ListfieldIterators so that it applies to my list? And does it work that way?

    Any help will be greatly appreciated....

  • Mon, Nov 3 2008 12:25 PM In reply to

    Re: Where to put code that uses ListFieldIterator for a list?

     I assume you have created  a custom template in the form of a .ascx file that you have installed in the 12-hive in \TEMPLATE\CONTROL TEMPLATES\. Then if you add atop the .ascx file the appropriate ASSEMBLY and REGISTER directives, you can install your code controlling the cascading dropdowns in the GAC.

    Hope this helps ...

     

  • Mon, Nov 3 2008 1:49 PM In reply to

    Re: Where to put code that uses ListFieldIterator for a list?

    No, I want to use the existing NewItem.aspx form and fill the dropdowns dynamically using Field Iterators instead of by default. So, I have not created any custom user control.

  • Sun, Nov 16 2008 2:16 AM In reply to

    Re: Where to put code that uses ListFieldIterator for a list?

    The "best practice" approach is to create custom fields.  This approach will allow you to use the built-in SharePoint forms but still have complete control over the fields.

     

Page 1 of 1 (4 items) | RSS
Copyright (c) 2008 Mixon Consulting, Inc.
Powered by Community Server (Commercial Edition), by Telligent Systems