title: Sitecore ContentEditor Callback and Custom Field Type
body: <p>I'm developing a custom field type that extends from LookupEx.  The purpose of the control is to allow the user to select from the drop down, and based upon that selection populated additional fields of type Multilist.</p>
  
  <pre><code>    public class CascadingDroplink : LookupEx
      {
          private const string sourceFieldName = "CascadingDroplink";
  
          protected override void DoRender(System.Web.UI.HtmlTextWriter output)
          {
  
          StringBuilder sb = new StringBuilder();
          sb.AppendLine("&lt;script type=\"text / javascript\"&gt;");
          sb.AppendLine(" var $j = jQuery.noConflict(); ");
          sb.AppendLine(string.Format(" $j(\"#{0}\").change(function(event) {{ ", this.ID));
          sb.AppendLine(string.Format("scForm.invoke('contenteditor:save', event);"));
          sb.AppendLine(string.Format(" }});"));
          sb.AppendLine("&lt;/script&gt;");
          output.Write(sb.ToString());
  </code></pre>
  
  <p>Fromt the embeded javascript, you can see I have found a way to perform a callback by simulating the click even of the Save button:</p>
  
  <pre><code>scForm.invoke('contenteditor:save', event);
  </code></pre>
  
  <p>And while this works, the content editor is refreshed, and the Multilist fields are updated with custom datasources, saving isn't ideal because there could be validation present.</p>
  
  <p>How can the contenteditor be refreshed, as if the area was within a callback panel, without calling save?</p>
  
  <p>Thanks!</p>