Example #1
0
 internal void ShowFilterPopup(GridColumn column, FilterPopupMode mode)
 {
     column.OptionsFilter.FilterPopupMode       = mode;
     column.OptionsFilter.ShowBlanksFilterItems = DevExpress.Utils.DefaultBoolean.True;
     ShowFilterPopup(column);
     column.OptionsFilter.ShowBlanksFilterItems = DevExpress.Utils.DefaultBoolean.Default;
     column.OptionsFilter.FilterPopupMode       = FilterPopupMode.Default;
 }
Example #2
0
        /// <summary>
        /// Sets the FilterPopupMode for the OrderDate column.
        /// </summary>
        /// <param name="sender">The object of the sender.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> that contains event data.</param>
        private void cmbFilterPopupModeOrderDate_SelectedIndexChanged(object sender, EventArgs e)
        {
            FilterPopupMode filterPopupMode = FilterPopupMode.Both;

            switch (cmbFilterPopupModeOrderDate.SelectedItem.ToString())
            {
            case "AdvancedFilter":
                filterPopupMode = FilterPopupMode.AdvancedFilter;
                break;

            case "CheckBoxFilter":
                filterPopupMode = FilterPopupMode.CheckBoxFilter;
                break;

            case "Both":
                filterPopupMode = FilterPopupMode.Both;
                break;
            }

            sfDataGrid1.Columns["OrderDate"].FilterPopupMode = filterPopupMode;
        }
        protected override FilterPopupMode GetFilterPopupMode()
        {
            FilterPopupModeExtended modeExtended = OptionsFilter.FilterPopupMode;
            FilterPopupMode         mode         = FilterPopupMode.List;

            if (modeExtended == FilterPopupModeExtended.Default &&
                (ColumnType.Equals(typeof(DateTime)) || ColumnType.Equals(typeof(DateTime?))) &&
                FilterMode != ColumnFilterMode.DisplayText)
            {
                modeExtended = FilterPopupModeExtended.DateSmart;
            }
            if (modeExtended == FilterPopupModeExtended.Default)
            {
                modeExtended = FilterPopupModeExtended.List;
            }
            OptionsFilter.UseFilterPopupRangeDateMode = false;
            switch (modeExtended.ToString())
            {
            case "Default": { mode = FilterPopupMode.Default; break; }

            case "List": { mode = FilterPopupMode.List; break; }

            case "CheckedList": { mode = FilterPopupMode.CheckedList; break; }

            case "Date": { mode = FilterPopupMode.Date; break; }

            case "DateSmart": { mode = FilterPopupMode.DateSmart; break; }

            case "DateAlt": { mode = FilterPopupMode.DateAlt; break; }

            case "DateRange": { mode = FilterPopupMode.Date; OptionsFilter.UseFilterPopupRangeDateMode = true; break; }

            default:
                break;
            }
            return(mode);
        }
Example #4
0
 /// <summary>
 ///    Sets the filer popup mode for the column. Default ist CheckedList
 /// </summary>
 public static TColumn WithFilterPopupMode <TColumn>(this TColumn column, FilterPopupMode filterPopupMode) where TColumn : IGridViewColumn
 {
     column.FilterPopupMode = filterPopupMode;
     return(column);
 }