public string Process()
        {
            SearchDialogSettings searchDialogSettings = _grid.SearchDialogSettings;

            if (searchDialogSettings.TopOffset != 0)
            {
                _jsonValues["top"] = searchDialogSettings.TopOffset;
            }
            if (searchDialogSettings.LeftOffset != 0)
            {
                _jsonValues["left"] = searchDialogSettings.LeftOffset;
            }
            if (searchDialogSettings.Width != 300)
            {
                _jsonValues["width"] = searchDialogSettings.Width;
            }
            if (searchDialogSettings.Height != 300)
            {
                _jsonValues["height"] = searchDialogSettings.Height;
            }
            if (searchDialogSettings.Modal)
            {
                _jsonValues["modal"] = true;
            }
            if (!searchDialogSettings.Draggable)
            {
                _jsonValues["drag"] = false;
            }
            if (!string.IsNullOrEmpty(searchDialogSettings.FindButtonText))
            {
                _jsonValues["Find"] = searchDialogSettings.FindButtonText;
            }
            if (!string.IsNullOrEmpty(searchDialogSettings.ResetButtonText))
            {
                _jsonValues["Clear"] = searchDialogSettings.ResetButtonText;
            }
            if (searchDialogSettings.MultipleSearch)
            {
                _jsonValues["multipleSearch"] = true;
            }
            if (searchDialogSettings.ValidateInput)
            {
                _jsonValues["checkInput"] = true;
            }
            if (!searchDialogSettings.Resizable)
            {
                _jsonValues["resize"] = false;
            }
            _jsonValues["recreateForm"] = true;
            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();
        }