public string Process()
        {
            ViewRowDialogSettings viewRowDialogSettings = _grid.ViewRowDialogSettings;

            if (viewRowDialogSettings.TopOffset != 0)
            {
                _jsonValues["top"] = viewRowDialogSettings.TopOffset;
            }
            if (viewRowDialogSettings.LeftOffset != 0)
            {
                _jsonValues["left"] = viewRowDialogSettings.LeftOffset;
            }
            if (viewRowDialogSettings.Width != 300)
            {
                _jsonValues["width"] = viewRowDialogSettings.Width;
            }
            if (viewRowDialogSettings.Height != 300)
            {
                _jsonValues["height"] = viewRowDialogSettings.Height;
            }
            if (viewRowDialogSettings.Modal)
            {
                _jsonValues["modal"] = true;
            }
            if (!viewRowDialogSettings.Draggable)
            {
                _jsonValues["drag"] = false;
            }
            if (!string.IsNullOrEmpty(viewRowDialogSettings.Caption))
            {
                _jsonValues["editCaption"] = viewRowDialogSettings.Caption;
            }
            if (!string.IsNullOrEmpty(viewRowDialogSettings.SubmitText))
            {
                _jsonValues["bSubmit"] = viewRowDialogSettings.SubmitText;
            }
            if (!string.IsNullOrEmpty(viewRowDialogSettings.CancelText))
            {
                _jsonValues["bCancel"] = viewRowDialogSettings.CancelText;
            }
            if (!viewRowDialogSettings.Resizable)
            {
                _jsonValues["resize"] = false;
            }
            return(JsonConvert.SerializeObject((object)_jsonValues));
        }
예제 #2
0
        }                                        //добавлено из старой версии

        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();
        }