首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >DevExtreme刷新网格

DevExtreme刷新网格
EN

Stack Overflow用户
提问于 2020-05-29 13:12:03
回答 1查看 1.5K关注 0票数 1
代码语言:javascript
运行
复制
form: {
            labelLocation: "left",
            items: [
                {
                    dataField: "PART_CODE",
                    dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                    visible: true,//Default Value: true
                    isRequired: true,//Default Value: undefined

                    editorType: "dxTextBox",//Accepted Values: 'dxAutocomplete' | 'dxCalendar' | 'dxCheckBox' | 'dxColorBox' | 'dxDateBox' | 'dxDropDownBox' | 'dxLookup' | 'dxNumberBox' | 'dxRadioGroup' | 'dxRangeSlider' | 'dxSelectBox' | 'dxSlider' | 'dxSwitch' | 'dxTagBox' | 'dxTextArea' | 'dxTextBox'
                    editorOptions: {
                        showClearButton: true,//Default Value: false
                    },

                    validationRules: [
                        {type: "required"},
                        {type: "stringLength", max: 10},
                    ],
                },
                {},
                {
                    dataField: "PNAME_CODE",
                    dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                    visible: true,//Default Value: true
                    isRequired: true,//Default Value: undefined

                    editorType: "dxSelectBox",//Accepted Values: 'dxAutocomplete' | 'dxCalendar' | 'dxCheckBox' | 'dxColorBox' | 'dxDateBox' | 'dxDropDownBox' | 'dxLookup' | 'dxNumberBox' | 'dxRadioGroup' | 'dxRangeSlider' | 'dxSelectBox' | 'dxSlider' | 'dxSwitch' | 'dxTagBox' | 'dxTextArea' | 'dxTextBox'
                    editorOptions: {
                        showClearButton: true,//Default Value: false

                        onValueChanged: function (data) {
                            console.log(data.parent);
                            alert(data.value);

                        },
                    },

                    validationRules: [
                        {type: "required"},
                    ],
                },
                {
                    dataField: "PART_NAME",
                    dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                    visible: true,//Default Value: true
                    isRequired: true,//Default Value: undefined

                    editorType: "dxTextBox",//Accepted Values: 'dxAutocomplete' | 'dxCalendar' | 'dxCheckBox' | 'dxColorBox' | 'dxDateBox' | 'dxDropDownBox' | 'dxLookup' | 'dxNumberBox' | 'dxRadioGroup' | 'dxRangeSlider' | 'dxSelectBox' | 'dxSlider' | 'dxSwitch' | 'dxTagBox' | 'dxTextArea' | 'dxTextBox'
                    editorOptions: {
                        showClearButton: true,//Default Value: false
                    },

                    validationRules: [
                        {type: "required"},
                        {type: "stringLength", max: 50},
                    ],
                },
                {
                    dataField: "PART_BIGO",
                    dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                    visible: true,//Default Value: true
                    isRequired: false,//Default Value: undefined

                    editorType: "dxTextArea",//Accepted Values: 'dxAutocomplete' | 'dxCalendar' | 'dxCheckBox' | 'dxColorBox' | 'dxDateBox' | 'dxDropDownBox' | 'dxLookup' | 'dxNumberBox' | 'dxRadioGroup' | 'dxRangeSlider' | 'dxSelectBox' | 'dxSlider' | 'dxSwitch' | 'dxTagBox' | 'dxTextArea' | 'dxTextBox'
                    editorOptions: {
                        showClearButton: true,//Default Value: false
                        height: 80,
                    },

                    validationRules: [
                        {type: "stringLength", max: 500},
                    ],
                },
                {},
                {
                    id: "testGrid",
                    editorType: "dxDataGrid",
                    editorOptions: {
                        height : "390px",
                        dataSource: test,
                        columns: [
                        {
                            caption: "파트코드",
                            dataField: "PART_CODE",
                            dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                            visible: true,//Default Value: true
                        },
                        {
                            caption: "품명",
                            dataField: "PROD_NAME",
                            // dataField: "PNAME_NAME",
                            dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                            visible: true,//Default Value: true
                        },
                        {
                            caption: "파트명",
                            dataField: "PART_NAME",
                            dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                            visible: true,//Default Value: true
                        },
                        {
                            caption: "비고",
                            dataField: "PART_BIGO",
                            dataType: "string",//Accepted Values: undefined (Default) | 'string' | 'number' | 'date' | 'boolean' | 'object' | 'datetime'

                            visible: true,//Default Value: true
                        },
                    ],

                    sorting: {
                        mode: "multiple"
                    },
                    allowColumnReordering: true,
                    allowColumnResizing: true,
                    columnAutoWidth: true,
                    groupPanel: {
                        visible: true
                    },
                    selection: {
                        mode: "single"
                    }
                    },

                },

            ],

        },

当我更改dxSelectBox选择时,刷新'editorType: dxDataGrid‘

必须在dxSelectBox上更改dxDataGrid dataSource。所以我试了试

测试结果是CustomStore,它是有效的。

我想使用其他声明弹出窗口,但我不能使用编辑

如果不能刷新,我想找其他方法..

可以刷新测试ajax成功函数吗?

我该怎么做呢?

EN

回答 1

Stack Overflow用户

发布于 2020-06-11 22:04:39

这就是我如何使用JQuery重新加载我的.NET MVC数据网格。

您可以使用任何事件,但我使用此事件调用它:

代码语言:javascript
运行
复制
.OnRowUpdated("reloadMainDataGrid")

在JQuery中使用此函数:

代码语言:javascript
运行
复制
function reloadMainDataGrid() {
    $("#MainDataGrid").dxDataGrid("getDataSource").reload();
}

我希望这能帮助你找到正确的答案。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62079111

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档