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
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
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.
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);