protected virtual void InitializeControlEditor(HtmlGenericControl formGroup, HtmlGenericControl controlElement, IFormEditorProvider editorProvider, PropertyDisplayMetadata property, DynamicDataContext dynamicDataContext)
        {
            editorProvider.CreateControl(controlElement, property, dynamicDataContext);

            // set CSS classes
            foreach (var control in controlElement.GetAllDescendants())
            {
                if (control is TextBox || control is ComboBox)
                {
                    ((HtmlGenericControl)control).Attributes["class"] = "form-control";
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Creates the contents of the editor cell for the specified property.
 /// </summary>
 protected virtual void InitializeControlEditor(HtmlGenericControl row, HtmlGenericControl editorCell, IFormEditorProvider editorProvider, PropertyDisplayMetadata property, DynamicDataContext dynamicDataContext)
 {
     editorProvider.CreateControl(editorCell, property, dynamicDataContext);
 }
Esempio n. 3
0
 protected virtual void InitializeControlEditor(HtmlGenericControl formGroup, HtmlGenericControl controlElement, IFormEditorProvider editorProvider, PropertyDisplayMetadata property, DynamicDataContext dynamicDataContext)
 {
     editorProvider.CreateControl(controlElement, property, dynamicDataContext);
 }