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成功函数吗?
我该怎么做呢?
发布于 2020-06-11 22:04:39
这就是我如何使用JQuery重新加载我的.NET MVC数据网格。
您可以使用任何事件,但我使用此事件调用它:
.OnRowUpdated("reloadMainDataGrid")
在JQuery中使用此函数:
function reloadMainDataGrid() {
$("#MainDataGrid").dxDataGrid("getDataSource").reload();
}
我希望这能帮助你找到正确的答案。
https://stackoverflow.com/questions/62079111
复制相似问题