sheets.filterObject
Defines the filtering criteria for this sheet, if any.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
ref: "A1:C10",
columns: [
{ index: 0, type: "value", value: "John", filter: "custom", criteria: [{ value: "J", operator: "contains" }] }
]
}
}]
});
</script>
sheets.filter.columnsArray
An array which defines the filter configuration of individual columns.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
ref: "A1:C10",
columns: [
{ index: 0, type: "value", value: "Product A", filter: "custom", criteria: [{ value: "A", operator: "contains" }] },
{ index: 1, type: "custom", logic: "and", filter: "custom", criteria: [{ value: "A", operator: "contains" }] }
]
}
}]
});
</script>
sheets.filter.columns.criteriaArray
An array of filter criteria for custom filters.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
type: "custom",
criteria: [
{ operator: "gte", value: "100" },
{ operator: "lte", value: "500" }
]
}]
}
}]
});
</script>
sheets.filter.columns.criteria.operatorString
The operator type of the criterion.
The supported types vary based on the inferred column data type (inferred):
Text-contains- The text contains the value. -doesnotcontain- The text does not contain the value. -startswith- The text starts with the value. -endswith- The text ends with the value.Date-eq- The date is the same as the value. -neq- The date is not the same as the value. -lt- The date is before the value. -gt- The date is after the value.Number-eq- Is equal to the value. -neq- Is not equal to the value. -gte- Is greater than or equal to the value. -gt- Is greater than the value. -lte- Is less than or equal to the value. -lt- Is less than the value.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
criteria: [
{ operator: "contains", value: "text" }
]
}]
}
}]
});
</script>
sheets.filter.columns.criteria.valueString
The value for the criteria operator.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
criteria: [
{ operator: "eq", value: "Product A" }
]
}]
}
}]
});
</script>
sheets.filter.columns.filterString
The filter that will apply to this column.
The supported filters are:
value- Filters based on unique values.custom- Applies custom filtering criteria.top- Filters the top or bottom records.dynamic- Filters based on dynamic criteria.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
filter: "value",
value: "Category A"
}]
}
}]
});
</script>
sheets.filter.columns.indexNumber
The index of the column relative to the filter range.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
ref: "A1:D10",
columns: [{
index: 2,
type: "value",
value: "Active",
filter: "custom",
criteria: [{ value: "A", operator: "contains" }]
}]
}
}]
});
</script>
sheets.filter.columns.logicString
The logical operator that will apply to filter criteria.
The supported values are:
andor
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
type: "custom",
logic: "and",
criteria: [
{ operator: "gte", value: "100" },
{ operator: "lte", value: "500" }
]
}]
}
}]
});
</script>
sheets.filter.columns.typeString
The filter sub-type, if any.
The applicable types according to the main filter are:
toptopNumbertopPercentbottomNumberbottomPercent
dynamicaboveAveragebelowAveragetomorrowtodayyesterdaynextWeekthisWeeklastWeeknextMonththisMonthlastMonthnextQuarterthisQuarterlastQuarternextYearthisYearlastYearyearToDate
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
filter: "top",
type: "topNumber",
value: 10
}]
}
}]
});
</script>
sheets.filter.columns.valueNumber|String|Date
The filter value for filters that require a single value, for example, top.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
type: "value",
value: "Category A"
}]
}
}]
});
</script>
sheets.filter.columns.valuesArray
The filter values for filters that support multiple values.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
columns: [{
index: 0,
type: "value",
values: ["Category A", "Category B", "Category C"]
}]
}
}]
});
</script>
sheets.filter.refString
The active range for the filter, for example, B1:D8.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
filter: {
ref: "A1:C10",
columns: [{
index: 0,
type: "value",
value: "Product",
filter: "custom",
criteria: [{ value: "A", operator: "contains" }]
}]
}
}]
});
</script>