/// <summary>
 /// Initializes a new instance of the JqGridColumnEditableAttribute class.
 /// </summary>
 /// <param name="editable">If this column can be edited</param>
 public JqGridColumnEditableAttribute(bool editable)
     : base()
 {
     DateFormat  = JqGridOptionsDefaults.ColumnModel.DateFormat;
     Editable    = editable;
     EditOptions = new JqGridColumnEditOptions();
     EditType    = JqGridOptionsDefaults.ColumnModel.EditType;
     FormOptions = new JqGridColumnFormOptions();
 }
示例#2
0
 internal static bool AreDefault(this JqGridColumnEditOptions editOptions)
 {
     return(String.IsNullOrWhiteSpace(editOptions.CustomElementFunction) &&
            String.IsNullOrWhiteSpace(editOptions.CustomValueFunction) &&
            (editOptions.NullIfEmpty == JqGridOptionsDefaults.ColumnModel.Editing.NullIfEmpty) &&
            String.IsNullOrWhiteSpace(editOptions.PostDataScript) &&
            (editOptions.PostData == null) &&
            (editOptions as JqGridColumnElementOptions).AreDefault());
 }
示例#3
0
 internal static void SetColumnEditOptions(this ModelMetadata metadata, JqGridColumnEditOptions editOptions)
 {
     metadata.AdditionalValues.Add(_editOptionsKey, editOptions);
 }
 internal static void SetColumnEditOptions(this ModelMetadata metadata, JqGridColumnEditOptions editOptions)
 {
     metadata.AdditionalValues.Add(_editOptionsKey, editOptions);
 }
 /// <summary>
 /// Initializes a new instance of the JqGridColumnEditableAttribute class.
 /// </summary>
 /// <param name="editable">If this column can be edited</param>
 public JqGridColumnEditableAttribute(bool editable)
     : base()
 {
     DateFormat = JqGridOptionsDefaults.DateFormat;
     Editable = editable;
     EditOptions = new JqGridColumnEditOptions();
     EditType = JqGridColumnEditTypes.Text;
     FormOptions = new JqGridColumnFormOptions();
 }