UPDATE (04/2008): Ovaj veliki blog entry pokazuje dobru javascript pristup temeljen na taj problem: http://webborg.blogspot.com/2008/04/add-functions-and-events-to-sharepoint.html
UPDATE II: (04/2008): Ovaj blog ulaz izgleda obećavajuće kao i: http://www.cleverworkarounds.com/2008/03/13/free-mosswss-2007-web-part-hide-controls-via-javascript/
Nekoliko puta tjedno, ako ne i svakodnevno, forum users describe a requirement that would normally be met via cascading drop-downs. Na primjer, Imam dvije kap-dolje kontrole:
- Popis SAD-a. države
- Popis SAD-a. gradova.
Kao odgovorne UI usluga, želimo da djeluju poput ove:
- Paul bira dopuštenje vlade. state from the drop-down.
- This causes the cities drop-down to filter only those cities that belong to the selected state.
- Pavao odabire grad iz ovog izdvojenog popisa.
There is no out-of-the-box support for this feature. Zapravo, there is no OOB support for any kind of direct intra-form communication. This includes programmatically hiding/enabling/disabling fields in response to field changes elsewhere on the form.
Pravi cilj ovog članka je opisati moguća rješenja, a to su opcije kao što sam ih znali:
- Develop a custom column type. As a custom-column-developer, you have full control over the "world" of that custom column. You can implement a cascading drop-down that way.
- Consider using workflow. In some cases, you want to automatically assign a value to field based on another field’s value. U tom slučaju, inače bi pokušati koristiti izračunatog stupca, ali neki puta, it just won’t get the job done. SharePoint Designer workflow is a relatively administer-friendly alternative to dropping down into code and visual studio. If you go this route, biti svjesni tog problema obratili ovaj članak (http://paulgalvin.spaces.live.com/blog/cns!CC1EDB3DAA9B8AA!405.entry).
- Događaj rukuju: Kao i tijekom rada, this is an after-the-fact solution. Your event handler is a .NET assembly (C #, VB.NET) to which SharePoint passes control. The object you develop has access to the data of the list (, a cijeli objekt Model) i može učiniti bilo potrebno izračun.
- Use SharePoint Designer to create custom entry forms. I don’t have direct experience with this approach, but I hear they are doing good things with NewForm.aspx these days 🙂
- Roll svoj ASP.NET podataka funkciju unosa (kao stand-alone web stranicu ili kao web-dio) i koristiti da umjesto.
Ako netko zna druge i / ili bolja opcija, molimo Vas da objavite komentar, a ja ću ažurirati tijelo ovog posta.
<kraj />
Pavle,
Pazi ovo: http://www.spsdev.com/filter.aspx .
Iz njihove stranice: "SpsDev.Com’s Filter Field is a custom field type that does filtering.
Možete dodati jedan na mnogim poljima filter na popisu ili u biblioteci, i svaki od njih može
be filtered based on another filtered field in the list. Pick a state in
jedno polje, i popis gradova u sljedećem polju se filtrira samo pokazuju
stavke iz tog stanja, na primjer. In this release we support SQL Server
2000 i 2005, and Xml as sources for the field data. As you change a
Izbor u bilo kojem od padajuće, sve padajuće ispod njega su svaki
filtriraju se prikazuju samo odgovarajuće odluke na temelju odabira koji je
učinjen."
– Monjo