colCountByScreen

Specifies dependency between the screen factor and the count of columns in the form layout.

Type: any
Default Value: undefined

The following code sample illustrates how to set this property:

jQuery
JavaScript
$(function() {
    $("#formContainer").dxForm({
        // ...
        colCountByScreen: {
            xs: 2
        }
    });
});
Angular
HTML
TypeScript
<dx-form ... >
    <dxo-col-count-by-screen [xs]="2"></dxo-col-count-by-screen>
</dx-form>
import { DxFormModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxFormModule
    ],
    // ...
})
Vue
App.vue
<template>
    <DxForm ...>
        <DxColCountByScreen :xs="2"/>
    </DxForm>
</template>
<script>
import DxForm, { DxColCountByScreen } from 'devextreme-vue/form';

export default {
    components: {
        DxForm,
        DxColCountByScreen
    }
}
</script>
React
App.js
import React from 'react';
import Form, { ColCountByScreen } from 'devextreme-react/form';

const App = () => {
    return (
        <Form ...>
            <ColCountByScreen xs={2} />
        </Form>
    );
};

export default App;

View Demo

lg

The count of columns for a large screen size.

Type:

Number

Default Value: undefined

md

The count of columns for a middle-sized screen.

Type:

Number

Default Value: undefined

sm

The count of columns for a small-sized screen.

Type:

Number

Default Value: undefined

xs

The count of columns for an extra small-sized screen.

Type:

Number

Default Value: undefined