RealGrid2 API
Interface
FilterAutomatingOptions

FilterAutomatingOptions

Setting information regarding automatic filtering

Signature:

export interface FilterAutomatingOptions

Remarks

When setting it as an option in Grid, you only need to enter the necessary information.

Example

grid.setFilteringOptions({
      automating: {
          dateCategorize: false
      }
});

Events

PropertyTypeDescription
dateCategoryCallbackCategoryCallbackCallback to sort dates
numberCategoryCallbackCategoryCallbackCallback to classify numbers
textCategoryCallbackCategoryCallbackCallback to sort string

Properties

PropertyTypeDescription
dateCategorizebooleanWhether to sort dates
dateDayFormatstringFormat of days displayed in entries
dateMonthFormatstringMonth format displayed in entries
dateQuarterFormatstringBranch format displayed in items
dateYearFormatstringYear format displayed in entries
filteredDataOnlybooleanData displayed in FilterSelector
hourFormatstringTime format displayed in items
lookupDisplaybooleanIf Column's lookupDisplay is true, the label is displayed instead of the value.
minuteFormatstringFormat of minutes displayed in entries
numberCategorizebooleanWhether to classify numbers
secondFormatstringFormat of seconds displayed in entries
selectCallbackFilterCallbackCallback called when the filter created by DataColumn.autoFilter is selected
textCategorizebooleanWhether to classify text
timeCategorizeTimeCategoryWhen classifying time, specify classification in hours/minutes/seconds.
userFilterPositionUserFilterPositionUsed when displaying filters added by users as well.

Events Desc

dateCategoryCallback

Callback to sort dates

Type - CategoryCallback

Remarks:

See FilterCategory for return values and descriptions.


numberCategoryCallback

Callback to classify numbers

Type - CategoryCallback

Remarks:

See FilterCategory for return values and descriptions.


textCategoryCallback

Callback for sorting strings

Type - CategoryCallback

Remarks:

See FilterCategory for return values and descriptions.


Properties Desc

dateCategorize

Whether to sort dates

Type - boolean

Remarks:

When set to true, the text is classified by year, quarter, or month based on the formats set.

The number of years must be 2 or more and the number of months must be 7 or more to be classified by year.

The number of months per year must be 7 or more to be classified by quarter.

The total number of days must be 10 or more and the number of months must be 4 or more to be classified as monthly.

If false, a filter tab is created for each item in a list format rather than a tree format.

You can create custom categories by specifying FilterAutomatingOptions.dateCategoryCallback.


dateDayFormat

The date format displayed in the entry

Type - string


dateMonthFormat

Month format displayed in entries

Type - string


dateQuarterFormat

Format of branches displayed in items

Type - string


dateYearFormat

Year format displayed in entries

Type - string


filteredDataOnly

Data displayed in FilterSelector

Type - boolean

Remarks:

If true, only the filtered data is displayed in the filterSelector, not the entire data.

Applies only to columns where DataColumn.autoFilter is true.


hourFormat

Time format displayed in items

Type - string


lookupDisplay

If Column's lookupDisplay is true, the label is displayed instead of the value.

Type - boolean


minuteFormat

Format of minutes displayed in entries

Type - string


numberCategorize

Whether to classify numbers

Type - boolean

Remarks:

When true, if there are more than 16 duplicated items, they are classified into 4 to 8 sections based on the difference between the maximum and minimum values. If there are less than 15 items or false, a filter tab is created for each item in the form of a list rather than a tree. You can do custom classification by specifying FilterAutomatingOptions.numberCategoryCallback.


secondFormat

Format of seconds displayed in entries

Type - string


selectCallback

Callback called when a filter created by DataColumn.autoFilter is selected

Type - FilterCallback

Remarks:

Used when the user decides filtering.


textCategorize

Whether to classify text

Type - boolean

Remarks:

When true, if there are more than 16 items, they are classified into numbers, uppercase letters, lowercase letters, Unicode, and others based on the first character of the string. If there are less than 15 items or false, a filter tab is created for each item in the form of a list rather than a tree. You can do custom classification by specifying FilterAutomatingOptions.textCategoryCallback.


timeCategorize

When classifying time, specify classification in hours/minutes/seconds.

Type - TimeCategory

Remarks:

If timeCategorize is specified, dateCategorize is not applied.


userFilterPosition

Used when displaying filters added by the user.

Type - UserFilterPosition