A RetroSearch Logo

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

Search Query:

Showing content from https://js.devexpress.com/Documentation/ApiReference/Data_Layer/ArrayStore/Configuration/ below:

DevExtreme React - ArrayStore Props

This section describes properties that configure the ArrayStore.

Specifies the store's associated array.

jQuery
var store = new DevExpress.data.ArrayStore({
    data: [
        { id: 1, name: "John Doe" },
        // ...
    ]
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            data: [
                { id: 1, name: "John Doe" },
                // ...
            ]
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    data: [
        { id: 1, name: 'John Doe' },
        // ...
    ]
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    data: [
        { id: 1, name: 'John Doe' },
        // ...
    ]
});

class App extends React.Component {
    // ...
}
export default App;

Specifies the function that is executed when the store throws an error.

This function accepts a JavaScript Error object as the parameter.

jQuery
var store = new DevExpress.data.ArrayStore({
    // ...
    errorHandler: function (error) {
        console.log(error.message);
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            // ...
            errorHandler: function (error) {
                console.log(error.message);
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    errorHandler: (error) => {
        console.log(error.message);
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    errorHandler: (error) => {
        console.log(error.message);
    }
});

class App extends React.Component {
    // ...
}
export default App;

Specifies the key property (or properties) that provide(s) key values to access data items. Each key value must be unique.

In the following example, the ProductID and ProductCode properties are specified as key properties:

jQuery
var store = new DevExpress.data.ArrayStore({
    // ...
    key: ["ProductID", "ProductCode"]
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            // ...
            key: ["ProductID", "ProductCode"]
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    key: ['ProductID', 'ProductCode']
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    key: ['ProductID', 'ProductCode']
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed after a data item is added to the store.

Function parameters:

The added data item.

The item's key.

jQuery
var store = new DevExpress.data.ArrayStore({
    onInserted: function (values, key) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onInserted: function (values, key) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onInserted: function (values, key) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onInserted: function (values, key) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed before a data item is added to the store.

Function parameters:

The data item to be added.

jQuery
var store = new DevExpress.data.ArrayStore({
    onInserting: function (values) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onInserting: function (values) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onInserting: function (values, key) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onInserting: function (values, key) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed after data is loaded to the store.

Function parameters:

The loaded data.

Data processing settings.

jQuery
var store = new DevExpress.data.ArrayStore({
    onLoaded: function (result) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onLoaded: function (result) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onLoaded: function (result) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onLoaded: function (result) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed before data is loaded to the store.

Function parameters:

Data processing settings.

jQuery
var store = new DevExpress.data.ArrayStore({
    onLoading: function (loadOptions) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onLoading: function (loadOptions) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onLoading: function (loadOptions) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onLoading: function (loadOptions) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed after a data item is added, updated, or removed from the store.

jQuery
var store = new DevExpress.data.ArrayStore({
    onModified: function () {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onModified: function () {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onModified: function () {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onModified: function () {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed before a data item is added, updated, or removed from the store.

jQuery
var store = new DevExpress.data.ArrayStore({
    onModifying: function () {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onModifying: function () {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onModifying: function () {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onModifying: function () {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

The function executed before changes are pushed to the store.

jQuery
var store = new DevExpress.data.ArrayStore({
    onPush: function(changes) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onPush: (changes) => {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onPush: (changes) => {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onPush: (changes) => {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed after a data item is removed from the store.

Function parameters:

The removed data item's key.

jQuery
var store = new DevExpress.data.ArrayStore({
    onRemoved: function (key) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onRemoved: function (key) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onRemoved: function (key) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onRemoved: function (key) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed before a data item is removed from the store.

Function parameters:

The key of the data item to be removed.

jQuery
var store = new DevExpress.data.ArrayStore({
    onRemoving: function (key) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onRemoving: function (key) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onRemoving: function (key) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onRemoving: function (key) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed after a data item is updated in the store.

Function parameters:

The updated data item's key.

Updated values.

jQuery
var store = new DevExpress.data.ArrayStore({
    onUpdated: function (key, values) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onUpdated: function (key, values) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onUpdated: function (key, values) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onUpdated: function (key, values) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
export default App;

A function that is executed before a data item is updated in the store.

Function parameters:

The key of the data item to be updated.

New values for the data item fields.

jQuery
var store = new DevExpress.data.ArrayStore({
    onUpdating: function (key, values) {
        // Your code goes here
    }
});
Angular
import ArrayStore from "devextreme/data/array_store";
// ...
export class AppComponent {
    store: ArrayStore;
    constructor() {
        this.store = new ArrayStore({
            onUpdating: function (key, values) {
                // Your code goes here
            }
        })
    }
}
Vue
<script>
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onUpdating: function (key, values) {
        // Your code goes here
    }
});

export default {
    // ...
    data() {
        return {
            store
        }
    }
}
</script>
React
// ...
import ArrayStore from 'devextreme/data/array_store';

const store = new ArrayStore({
    // ...
    onUpdating: function (key, values) {
        // Your code goes here
    }
});

class App extends React.Component {
    // ...
}
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