I have a grid where I have a data element that is being received from my data store as
schema: {
model: {
id: "junkTypeId",
fields: {
junkTypeId: {
type: "integer"
},
junkTypeDesc: {
type: "string"
}
}
}
}
I display junkTypeDesc in my grid, for that is the human readable form of this datum.I have created a custom popup editor with a dropdownlist of all possible "junks". The dataTextField of the dropdownlist is set to junkTypeDesc and the dataValueField is set to junkTypeId. I have bound the dropdownlist to value:junkTypeId.
The popup editor window works great. The proper initial value is selected in the dropdownlist. I can drop down the dropdownlist and select a new junk. When I press the update button the windows is dismissed and I see (using fiddler) the new value of junkTypeId being sent to the backend but junkTypeDesc is still set to the old text value. In addition, the column in the grid is still set to the old text value.
I know that this is because I am binding to junkTypeId and not junkTypeDesc. But I need to do this because the ID is what is sent to the backend. How can I get the grid to show the new value of junkTypeDesc after I close the popup editor. Perhaps there is an event that I can attach to to update the appropriate grid cell.
I hope this description makes sense, it is somewhat difficult to describe.
Can anyone help me out with this problem?
schema: {
model: {
id: "junkTypeId",
fields: {
junkTypeId: {
type: "integer"
},
junkTypeDesc: {
type: "string"
}
}
}
}
I display junkTypeDesc in my grid, for that is the human readable form of this datum.I have created a custom popup editor with a dropdownlist of all possible "junks". The dataTextField of the dropdownlist is set to junkTypeDesc and the dataValueField is set to junkTypeId. I have bound the dropdownlist to value:junkTypeId.
The popup editor window works great. The proper initial value is selected in the dropdownlist. I can drop down the dropdownlist and select a new junk. When I press the update button the windows is dismissed and I see (using fiddler) the new value of junkTypeId being sent to the backend but junkTypeDesc is still set to the old text value. In addition, the column in the grid is still set to the old text value.
I know that this is because I am binding to junkTypeId and not junkTypeDesc. But I need to do this because the ID is what is sent to the backend. How can I get the grid to show the new value of junkTypeDesc after I close the popup editor. Perhaps there is an event that I can attach to to update the appropriate grid cell.
I hope this description makes sense, it is somewhat difficult to describe.
Can anyone help me out with this problem?