A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://js.devexpress.com/Vue/Documentation/ApiReference/Data_Layer/CustomStore/LoadOptions/ below:

DevExtreme Vue - CustomStore LoadOptions

This section describes the loadOptions object's fields.

import { Load_Options } from "devextreme/

common/data

"

This object is used to specify settings according to which the server should process data. More often these settings are passed as a parameter to the load function and depend on the operations (paging, filtering, sorting, etc.) that you have enabled in the DataSource or UI component.

See Also

An object for storing additional settings that should be sent to the server. Relevant to the ODataStore only.

An array of strings that represent the names of navigation properties to be loaded simultaneously with the ODataStore.

A filter expression.

Defines filtering parameters. Possible variants:

See Also

A group expression.

Defines grouping levels to be applied to the data. This object can have the following fields:

A group summary expression. Used with the group setting.

Type:

SummaryDescriptor |

Array<SummaryDescriptor>

Contains group summary definitions with the following structure, where summaryType can be "sum", "avg", "min", "max" or "count":

{ selector: "field", summaryType: "sum" }

When this property is specified, each data object should have a summary array that contains the resulting values in the same order as the summary definitions.

The IDs of the rows being expanded. Relevant only when the CustomStore is used in the TreeList UI component.

If the TreeList's expandedRowKeys are set, the parentIds array contains them and the root ID. Otherwise, the array contains only the ID of the row being expanded.

Indicates whether a top-level group count is required. Used in conjunction with the filter, take, skip, requireTotalCount, and group settings.

When this property is true, the result should contain the groupCount field. This field is the resulting data set's top-level group count.

Indicates whether the total count of data objects is needed.

When this property is true, the store expects the result to contain the totalCount field, which is the total data object count in the resulting data set. This count should reflect the number of data items after filtering but disregard any take parameter used for the query.

A data field or expression whose value is compared to the search value.

Along with searchValue and searchOperation, this property defines a simple filtering condition.

A comparison operation.

Along with searchValue and searchExpr, this property defines a simple filtering condition.

The number of data objects to be skipped from the result set's start. In conjunction with take, used to implement paging.

A sort expression.

Defines sorting properties. This object can have the following fields:

The number of data objects to be loaded. In conjunction with skip, used to implement paging.

A total summary expression.

Type:

SummaryDescriptor |

Array<SummaryDescriptor>

Contains summary definitions with the following structure, where summaryType can be "sum", "avg", "min", "max" or "count":

{ selector: "field", summaryType: "sum" }

When this property is specified, the store expects the result to have the summary array that contains the result values in the same order as the summary definitions.

An object for storing additional settings that should be sent to the server.

jQuery
$(function() {
    var customDataSource = new DevExpress.data.CustomStore({
        key: "ID",
        load: function (loadOptions) {
            let value = loadOptions.userData?.someValue;
            if(!value) {
                loadOptions.userData?.someValue = 5;
                alert("Initial value is set");
            } 
            else {
                alert("Cached value: " + value);
            }
        }
    });
    // ...
});
Angular
import { Component } from '@angular/core';
import CustomStore from 'devextreme/data/custom_store';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    customDataSource: CustomStore;
    constructor() {
        this.customDataSource = new CustomStore({
            key: 'ID',
            load: (loadOptions) => {
                let value = loadOptions.userData?.someValue;
                if(!value) {
                    loadOptions.userData?.someValue = 5;
                    alert("Initial value is set");
                } 
                else {
                    alert("Cached value: " + value);
                }
            }
        });
    }
}
Vue
<template>
    <!-- ... -->
</template>

<script>
// ...
import CustomStore from 'devextreme/data/custom_store';

const customDataSource = new CustomStore({
    key: 'ID',
    load: (loadOptions) => {
        let value = loadOptions.userData?.someValue;
        if(!value) {
            loadOptions.userData?.someValue = 5;
            alert("Initial value is set");
        } 
        else {
            alert("Cached value: " + value);
        }
    }
});

export default {
    components: {
        // ...
    },
    data() {
        return {
            customDataSource
        }
    }
}
</script>
React
// ...
import CustomStore from 'devextreme/data/custom_store';

const customDataSource = new CustomStore({
    key: 'ID',
    load: (loadOptions) => {
        let value = loadOptions.userData?.someValue;
        if(!value) {
            loadOptions.userData?.someValue = 5;
            alert("Initial value is set");
        } 
        else {
            alert("Cached value: " + value);
        }
    }
});

class App extends React.Component {
    render() {
        return (
            {/* ... */}
        );
    }
}
export default App;
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4