SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

lately I have been trying to develop a custom field (cascading dropdown) for sharepoint 2010. I am using the sample from codeplex. the problem is that the sample is for sharepoint 2007 and uses the as follows in XML.

    <Field Name="SiteUrl" Hidden="TRUE" DisplayName="SiteUrl" MaxLength="500" DisplaySize="100" Type="Text">

for some reason in Sharepoint 2010 this seems not to be working and is giving the following error:

System.InvalidCastException: Unable to cast object of type 'ASP._controltemplates_cascadingdropdowneditfieldcontrol_ascx' to type 'Microsoft.SharePoint.WebControls.IFieldEditor'.
at Microsoft.SharePoint.ApplicationPages.FieldCustomizationPage.CreateChildControls()
at Microsoft.SharePoint.ApplicationPages.FieldNewPage.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Microsoft.SharePoint.ApplicationPages.FieldCustomizationPage.OnLoad(EventArgs e)
at Microsoft.SharePoint.ApplicationPages.FieldNewPage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

is there a way to add same things in CreateChildControl instead of PropertySchema?? or anyone has suggestions to solve this issue?

share|improve this question
Could you link to the example on CodePlex, please? – Stuart Pegg Aug 30 '11 at 12:12
hi, the following is the link to what seems like the project, I managed to find same one open source but did not keep the link :S. basically it is the same as this one – IanCian Aug 30 '11 at 12:46
I can post the xml file if it is of any help, and the class using ifieldeditor main parts – IanCian Aug 30 '11 at 12:47
up vote 1 down vote accepted

Found this site which did the cascading drop down very easily: please refer to

share|improve this answer

This error may occure if your custom editor control 'ASP._controltemplates_cascadingdropdowneditfieldcontrol_ascx does not implement IFieldEditor interface or doing it wrong. MSDN recommends to use custom editor controls. Here is another greate example to start with. Hope it helps!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.