/// <summary>
    /// Reloads control with data.
    /// </summary>
    public void Reload()
    {
        // Check if provided class name exists
        DataClassInfo dci = DataClassInfoProvider.GetDataClassInfo(ClassName);

        if (dci == null)
        {
            return;
        }

        // Display or hide source field selection
        if (dci.ClassIsDocumentType && (FormInfo != null) && !IsAlternativeForm && !IsInheritedForm)
        {
            // Fill source field drop down list
            pnlSourceField.Visible = true;

            // Add document name source field
            drpSourceField.Items.Clear();
            drpSourceField.Items.Add(new ListItem(GetString(dci.ClassIsProduct ? "TemplateDesigner.ImplicitProductSourceField" : "TemplateDesigner.ImplicitSourceField"), ""));

            // Add alias name source field
            drpSourceAliasField.Items.Clear();
            drpSourceAliasField.Items.Add(new ListItem(GetString("TemplateDesigner.DefaultSourceField"), ""));

            AddField(drpSourceAliasField, "NodeID");
            AddField(drpSourceAliasField, "DocumentID");

            var columnNames = FormInfo.GetColumnNames();
            if (columnNames != null)
            {
                // Add attribute list item to the list of attributes
                foreach (string name in columnNames)
                {
                    FormFieldInfo ffiColumn = FormInfo.GetFormField(name);

                    // Add only text fields
                    if (ffiColumn.IsNodeNameSourceCandidate())
                    {
                        AddField(drpSourceField, name);
                    }

                    // Add all fields which allow to be used as alias
                    var dataType = DataTypeManager.GetDataType(TypeEnum.Field, ffiColumn.DataType);
                    if ((dataType != null) && dataType.AllowAsAliasSource)
                    {
                        AddField(drpSourceAliasField, name);
                    }
                }
            }

            // Set selected value
            if (drpSourceField.Items.FindByValue(dci.ClassNodeNameSource) != null)
            {
                drpSourceField.SelectedValue = dci.ClassNodeNameSource;
            }

            if (drpSourceAliasField.Items.FindByValue(dci.ClassNodeAliasSource) != null)
            {
                drpSourceAliasField.SelectedValue = dci.ClassNodeAliasSource;
            }
        }
    }