private SetReadOnly ( jQueryObject elements, bool isReadOnly ) : jQueryObject | ||
elements | jQueryObject | |
isReadOnly | bool | |
Результат | jQueryObject |
private void UpdateInterface() { for (var i = 0; i < editors.Count; i++) { var item = items[i]; var editor = editors[i]; bool readOnly = item.ReadOnly == true || !CanModifyItem(item); EditorUtils.SetReadOnly(editor, readOnly); EditorUtils.SetRequired(editor, !readOnly && Q.IsTrue(item.Required) && (item.EditorType != "Boolean")); if (item.Visible == false || item.ReadPermission != null || item.InsertPermission != null || item.UpdatePermission != null || item.HideOnInsert == true || item.HideOnUpdate == true) { bool hidden = (item.ReadPermission != null && !Q.Authorization.HasPermission(item.ReadPermission)) || item.Visible == false || (Mode == PropertyGridMode.Insert && item.HideOnInsert == true) || (Mode == PropertyGridMode.Update && item.HideOnUpdate == true); editor.GetGridField().Toggle(!hidden); } } }
private void UpdateInterface() { for (var i = 0; i < editors.Count; i++) { var item = items[i]; var editor = editors[i]; bool readOnly = item.ReadOnly == true || (Mode == PropertyGridMode.Insert && item.Insertable == false) || (Mode == PropertyGridMode.Update && item.Updatable == false); EditorUtils.SetReadOnly(editor, readOnly); EditorUtils.SetRequired(editor, !readOnly && Q.IsTrue(item.Required) && (item.EditorType != "Boolean")); if (item.Visible == false || item.HideOnInsert == true || item.HideOnUpdate == true) { bool hidden = item.Visible == false || (Mode == PropertyGridMode.Insert && item.HideOnInsert == true) || (Mode == PropertyGridMode.Update && item.HideOnUpdate == true); editor.GetGridField().Toggle(!hidden); } } }
private void UpdateReadOnly() { for (var i = 0; i < editors.Count; i++) { var item = items[i]; var editor = editors[i]; bool readOnly = item.ReadOnly == true || (Mode == PropertyGridMode.Insert && item.Insertable == false) || (Mode == PropertyGridMode.Update && item.Updatable == false); EditorUtils.SetReadOnly(editor, readOnly); EditorUtils.SetRequired(editor, !readOnly && Q.IsTrue(item.Required) && (item.EditorType != "Boolean")); } }
public static jQueryObject SetReadOnly(jQueryObject elements, bool isReadOnly) { return(EditorUtils.SetReadOnly(elements, isReadOnly)); }
public static void SetReadOnly(Widget widget, bool isReadOnly) { EditorUtils.SetReadOnly(widget, isReadOnly); }