Beispiel #1
0
 private static void SetSearchOperatorsStringColumn(CoreColumn jqColumn, JqGridBuilderColumnModel columnModel)
 {
     //#6188
     //jqColumn.SearchToolBarOperation =
     //    columnModel.AttributeInfo.DefaultSearchToolBarOperation ?? SearchOperation.Contains;
     jqColumn.SearchOptions          = JqGridHelper.GetSearchOperators(typeof(string));
     jqColumn.SearchToolBarOperation = SearchOperation.Contains;
     jqColumn.ShowSearchOperators    = false;
 }
Beispiel #2
0
        private void SetSearchOperatorsDateTimeColumn(CoreColumn jqColumn, JqGridBuilderColumnModel columnModel)
        {
            if (columnModel.AttributeInfo.NeedSearchEditorControl)
            {
                jqColumn.SearchType = SearchType.DatePicker;
            }

            jqColumn.SearchToolBarOperation =
                columnModel.AttributeInfo.DefaultSearchToolBarOperation ?? SearchOperation.IsEqualTo;
            jqColumn.SearchOptions    = JqGridHelper.GetSearchOperators(typeof(DateTime));
            jqColumn.DataFormatString = string.IsNullOrEmpty(columnModel.AttributeInfo.DateFormatString)
                ? "{0:dd.MM.yyyy}"
                : columnModel.AttributeInfo.DateFormatString;
        }
Beispiel #3
0
        private void SetSearchOperatorsBoolColumn(CoreColumn jqColumn, JqGridBuilderColumnModel columnModel)
        {
            jqColumn.Formatter = new CheckBoxFormatter {
                Enabled = jqColumn.Editable
            };
            jqColumn.SearchToolBarOperation =
                columnModel.AttributeInfo.DefaultSearchToolBarOperation ?? SearchOperation.IsEqualTo;
            jqColumn.ShowSearchOperators = false;
            jqColumn.SearchOptions       = JqGridHelper.GetSearchOperators(typeof(bool));

            jqColumn.SearchType = SearchType.DropDown;
            jqColumn.SearchList = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "Все", Value = null
                },
                new SelectListItem {
                    Text = "Да", Value = true.ToString()
                },
                new SelectListItem {
                    Text = "Нет", Value = false.ToString()
                }
            };
        }
Beispiel #4
0
 private static void SetSearchOperatorsIntColumn(CoreColumn jqColumn, JqGridBuilderColumnModel columnModel)
 {
     jqColumn.SearchToolBarOperation =
         columnModel.AttributeInfo.DefaultSearchToolBarOperation ?? SearchOperation.IsEqualTo;
     jqColumn.SearchOptions = JqGridHelper.GetSearchOperators(typeof(int));
 }