A RetroSearch Logo

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

Search Query:

Showing content from https://js.devexpress.com/Vue/Documentation/Guide/UI_Components/DataGrid/Scrolling/ below:

Vue DataGrid - Scrolling | Vue Documentation

Vue DataGrid - Scrolling

The following scrolling modes are available in the DataGrid:

Infinite Scrolling Demo Local Virtual Scrolling Demo Remote Virtual Scrolling Demo

Use the scrolling.mode property to specify the current scrolling mode.

jQuery
$(function() {
    $("#dataGridContainer").dxDataGrid({
        scrolling: {
            mode: "standard" // or "virtual" | "infinite"
        }
    });
});
Angular
<dx-data-grid ... >
    <dxo-scrolling
        mode="standard"> <!-- or "virtual" | "infinite" -->
    </dxo-scrolling>
</dx-data-grid>
import { DxDataGridModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxDataGridModule
    ],
    // ...
})
Vue
<template>
    <DxDataGrid ... >
        <DxScrolling mode="standard" /> <!-- or "virtual" | "infinite" -->
    </DxDataGrid>
</template>

<script>
import 'devextreme/dist/css/dx.light.css';

import DxDataGrid, {
    DxScrolling
} from 'devextreme-vue/data-grid';

export default {
    components: {
        DxDataGrid,
        DxScrolling
    }
}
</script>
React
import React from 'react';

import 'devextreme/dist/css/dx.light.css';

import DataGrid, {
    Scrolling
} from 'devextreme-react/data-grid';

class App extends React.Component {
    render() {
        return (
            <DataGrid ... >
                <Scrolling mode="standard" /> {/* or "virtual" | "infinite" */}
            </DataGrid>
        );
    }
}
export default App;

The DataGrid adapts its scrolling mechanism to the current platform. It utilizes native scrolling on most platforms, except non-Mac desktops, where the UI component simulates scrolling. You can force the DataGrid to use native or simulated scrolling on all platforms by setting the useNative property.

jQuery
$(function() {
    $("#dataGridContainer").dxDataGrid({
        scrolling: {
            useNative: true
        }
    });
});
Angular
<dx-data-grid ... >
    <dxo-scrolling
        [useNative]="true">
    </dxo-scrolling>
</dx-data-grid>
import { DxDataGridModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxDataGridModule
    ],
    // ...
})
Vue
<template>
    <DxDataGrid ... >
        <DxScrolling
            :use-native="true"
        />
    </DxDataGrid>
</template>

<script>
import 'devextreme/dist/css/dx.light.css';

import DxDataGrid, {
    DxScrolling
} from 'devextreme-vue/data-grid';

export default {
    components: {
        DxDataGrid,
        DxScrolling
    }
}
</script>
React
import React from 'react';

import 'devextreme/dist/css/dx.light.css';

import DataGrid, {
    Scrolling
} from 'devextreme-react/data-grid';

class App extends React.Component {
    render() {
        return (
            <DataGrid ... >
                <Scrolling
                    useNative={true}
                />
            </DataGrid>
        );
    }
}
export default App;

The current platform determines the native scrolling settings and you cannot adjust them, but you can control the simulated scrolling. Particularly, you can specify whether a user scrolls the content with a swipe gesture or scrollbar by setting the scrollByContent and scrollByThumb properties. The showScrollbar property specifies when the scrollbar should appear.

jQuery
$(function() {
    $("#dataGridContainer").dxDataGrid({
        scrolling: {
            useNative: false,
            scrollByContent: true,
            scrollByThumb: true,
            showScrollbar: "onHover" // or "onScroll" | "always" | "never"
        }
    });
});
Angular
<dx-data-grid ... >
    <dxo-scrolling
        [useNative]="false"
        [scrollByContent]="true"
        [scrollByThumb]="true"
        showScrollbar="onHover"> <!-- or "onScroll" | "always" | "never" -->
    </dxo-scrolling>
</dx-data-grid>
import { DxDataGridModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxDataGridModule
    ],
    // ...
})
Vue
<template>
    <DxDataGrid ... >
        <DxScrolling
            :use-native="false"
            :scroll-by-content="true"
            :scroll-by-thumb="true"
            show-scrollbar="onHover" /> <!-- or "onScroll" | "always" | "never" -->
    </DxDataGrid>
</template>

<script>
import 'devextreme/dist/css/dx.light.css';

import DxDataGrid, {
    DxScrolling
} from 'devextreme-vue/data-grid';

export default {
    components: {
        DxDataGrid,
        DxScrolling
    }
}
</script>
React
import React from 'react';

import 'devextreme/dist/css/dx.light.css';

import DataGrid, {
    Scrolling
} from 'devextreme-react/data-grid';

class App extends React.Component {
    render() {
        return (
            <DataGrid ... >
                <Scrolling
                    useNative={false}
                    scrollByContent={true}
                    scrollByThumb={true}
                    showScrollbar="onHover" /> {/* or "onScroll" | "always" | "never" */}
            </DataGrid>
        );
    }
}
export default App;

If you need to access and customize other scrolling settings, get the instance of the UI component's scrollable part by calling the getScrollable() method.

See Also 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