Wednesday, June 27, 2007

Custom Field Editors

This is a great thread about creating editor controls for custom field types in MOSS/WSS 3.0

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1109290&SiteID=1

Technorati Tags: , , ,

Friday, June 15, 2007

MOSS Custom Field Types

Custom field types allow you specify properties for the new field, such as the BusinessDataType in the schema below:

<PropertySchema>
            <Fields>
                <Field Name="BusinessDataType" DisplayName="Business Data Type" Type="Choice">
                    <CHOICES>
                        <CHOICE>Customers</CHOICE>
                        <CHOICE>Partners</CHOICE>
                    </CHOICES>
                    <Default>Customers</Default>
                </Field>
            </Fields>
        </PropertySchema>

When attempting to retrieve values from this schema in a custom field control you need to use the Field.GetCustomProperty method, as there is no Fields collection exposed.

del.icio.us Tags: , , ,

Thursday, June 14, 2007

Adding Columns to a GridView

Working with the new GridView control, I was struggling for a while with the change from the DataGrid OM...

Using the BoundField object solved the problem..

BoundField newField = new BoundField();
newField.DataField = thisColumn.DataColumnName;
newField.HeaderText = thisColumn.DisplayName;
grdResults.Columns.Add(newField);