This project is read-only.
A Multi Choice control with:
- buttons for sellecting and un-sellecting all the choices;
- fixed height and scrollbars;

Example of the control on the New Item page:
CSPF3.GIF

Example of the control on the AllItems page:
CSPF4.GIF

To install the control:

get the binaries, unpack them and edit the setup.bat file to replace:

set DefaultWebUrl=http://localhost/sites/dev
set DefaultSiteUrl=http://localhost/sites/dev

with approrpiate values. To uninstall just run setup -u

After installation, you can use it in the definitions of list:
CSPF1.GIF

This project can be used along with other SharePoint projects, for example in a list definition (schema.xml), in sitecolumn.xml, contrnt type definiotns, etc
Example:

<Field ID="{8482bffb-1e9a-46cd-9b65-a4d9bec1b876}"
Type="CustomMultiChoiceField"
DisplayName="CustomMultiChoice1"
Required="TRUE"
FillInChoice="FALSE"
StaticName="CustomMultiChoice1"
Name="CustomMultiChoice1">
<Customization>

<ArrayOfProperty>
<Property>
<Name>Values</Name>
<Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">Value1
Value2
Value3
Value4
Value5</Value>
</Property>
<Property>
<Name>Height</Name>
<Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:double" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
200
</Value>
</Property>
</ArrayOfProperty>
</Customization>
</Field>


WARNING
DO NOT USE localhost for DefaultWebUrl or DefaultSiteUrl. Use the site name instead.
If you do use localhost, after delpoyment, you might get this exception when trying to access the "Site Columns" from Site Admin (../_layouts/mngfield.aspx):

Error
Object reference not set to an instance of an object. at Microsoft.SharePoint.ApplicationPages.FieldListRenderer.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

To solve just uninstall the site Column (run setup -u), corect the localhost and deploy again.

Last edited Jan 15, 2009 at 2:24 PM by ctapus, version 4