} //добавлено из старой версии public CoreGrid(HttpContext context) { Context = context; AutoEncode = false; AutoWidth = false; ShrinkToFit = true; LoadOnce = false; ScrollToSelectedRow = false; EnableKeyboardNavigation = true; EditDialogSettings = new EditDialogSettings(); AddDialogSettings = new AddDialogSettings(); DeleteDialogSettings = new DeleteDialogSettings(); SearchDialogSettings = new SearchDialogSettings(); SearchToolBarSettings = new SearchToolBarSettings(); ViewRowDialogSettings = new ViewRowDialogSettings(); PagerSettings = new PagerSettings(); ToolBarSettings = new ToolBarSettings(); SortSettings = new SortSettings(); AppearanceSettings = new AppearanceSettings(); HierarchySettings = new HierarchySettings(); GroupSettings = new GroupSettings(); TreeGridSettings = new TreeGridSettings(); ExportSettings = new GridExportSettings(); ClientSideEvents = new ClientSideEvents(); PivotSettings = new PivotSettings(); Columns = new List <CoreColumn>(); HeaderGroups = new List <CoreGridHeaderGroup>(); DataUrl = ""; EditUrl = ""; ColumnReordering = false; RenderingMode = RenderingMode.Default; MultiSelect = false; MultiSelectMode = MultiSelectMode.SelectOnRowClick; MultiSelectKey = MultiSelectKey.None; Width = ""; Height = ""; ID = ""; IDPrefix = ""; PostData = ""; Responsive = false; StyleUI = "jQueryUI"; FunctionsHash = new Hashtable(); ReplacementsHash = new Hashtable(); }
public string Process() { DeleteDialogSettings deleteDialogSettings = _grid.DeleteDialogSettings; if (deleteDialogSettings.TopOffset != 0) { _jsonValues["top"] = deleteDialogSettings.TopOffset; } if (deleteDialogSettings.LeftOffset != 0) { _jsonValues["left"] = deleteDialogSettings.LeftOffset; } if (deleteDialogSettings.Width != 300) { _jsonValues["width"] = deleteDialogSettings.Width; } if (deleteDialogSettings.Height != 300) { _jsonValues["height"] = deleteDialogSettings.Height; } if (deleteDialogSettings.Modal) { _jsonValues["modal"] = true; } if (!deleteDialogSettings.Draggable) { _jsonValues["drag"] = false; } if (!string.IsNullOrEmpty(deleteDialogSettings.SubmitText)) { _jsonValues["bSubmit"] = deleteDialogSettings.SubmitText; } if (!string.IsNullOrEmpty(deleteDialogSettings.CancelText)) { _jsonValues["bCancel"] = deleteDialogSettings.CancelText; } if (!string.IsNullOrEmpty(deleteDialogSettings.LoadingMessageText)) { _jsonValues["processData"] = deleteDialogSettings.LoadingMessageText; } if (!string.IsNullOrEmpty(deleteDialogSettings.Caption)) { _jsonValues["caption"] = deleteDialogSettings.Caption; } if (!string.IsNullOrEmpty(deleteDialogSettings.DeleteMessage)) { _jsonValues["msg"] = deleteDialogSettings.DeleteMessage; } if (!deleteDialogSettings.ReloadAfterSubmit) { _jsonValues["reloadAfterSubmit"] = false; } if (!deleteDialogSettings.Resizable) { _jsonValues["resize"] = false; } _jsonValues["recreateForm"] = true; string json = JsonConvert.SerializeObject((object)_jsonValues); ClientSideEvents clientSideEvents = _grid.ClientSideEvents; json = JsonUtil.RenderClientSideEvent(json, "beforeShowForm", clientSideEvents.BeforeDeleteDialogShown); json = JsonUtil.RenderClientSideEvent(json, "afterShowForm", clientSideEvents.AfterDeleteDialogShown); json = JsonUtil.RenderClientSideEvent(json, "afterComplete", clientSideEvents.AfterDeleteDialogRowDeleted); json = JsonUtil.RenderClientSideEvent(json, "errorTextFormat", "function(data) { return 'Error: ' + data.responseText }"); return(JsonUtil.RenderClientSideEvent(json, "delData", string.Format("{{ __RequestVerificationToken: jQuery('input[name=__RequestVerificationToken]').val() }}", _grid.ID))); }