[DevExpress Support Team: CLONED FROM T456218: dxDataGrid - Cascaded dropdown editors]
I still don't get it.
Let say, I have two dropdowns for "Project" & "Worker"
there are Project A and B. Project A has workers X, Y, Z. Project B has workers K,L,M, N.
When I choose Project A. Only workers X, Y, Z comes out in the dropdown "Worker".
How to implement this using dxForm ?
Here is my code in PHP & Java script :
JavaScript $(function ()
{
var projects = <?= $projects ?>;
var workers = <?= $workers ?>;
$("#form").dxForm({
items: [
{
dataField: "Project",
editorType: "dxSelectBox",
editorOptions: {
items: projects,
displayExpr: "name",
valueExpr: "id",
},
validationRules: [{
type: "required",
message: "Project is required"
}]
},
{
dataField: "Worker",
editorType: "dxSelectBox",
editorOptions: {
items: workers,
displayExpr: "name",
valueExpr: "id",
},
validationRules: [{
type: "required",
message: "Worker is required"
}]
},