Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.
- // Displays the valueField after change
- 2.
- 3. {
- "name": "agency",
- "width": 172,
- "filterable": true,
- "editable": true,
- "header": "Agency",
- "editor": {
- "displayField": "display",
- "fieldLabel": "Agency",
- "xtype": "combo",
- "required": true,
- "blankText": "agency :",
- "hiddenName": "agency",
- "readOnly": false,
- "allowBlank": false,
- "mode": "local",
- "valueField": "id",
- "triggerAction": "all",
- "store": new Ext.data.SimpleStore({
- fields: ['id', 'display'],
- data: [
- [1, "BBDO"],
- [2, "Publicis"],
- [3, "Ogilvy & Mather NY"],
- [4, "Hill Holliday"],
- [5, "Standard Time"],
- [6, "Leo Burnett"]
- ]
- }),
- "name": "agency"
- }
- 4.
- 5.
- 6.
- // Displays the displayField after change
- 7. {
- "name": "status",
- "filterable": true,
- "editable": true,
- "header": "Status",
- "editor": {
- "displayField": "display",
- "fieldLabel": "Status",
- "xtype": "combo",
- "required": true,
- "blankText": "status :",
- "hiddenName": "status",
- "readOnly": false,
- "allowBlank": false,
- "mode": "local",
- "valueField": "id",
- "triggerAction": "all",
- "store": new Ext.data.SimpleStore({
- fields: ['id', 'display'],
- data: [
- [0, "Completed"],
- [1, "Not Started"],
- [2, "Cancelled"],
- [3, "In Progress"],
- [4, "Paused"]
- ]
- }),
- "name": "status"
- },
- "renderer": function (v) {
- a = {
- "0": "Completed",
- "1": "Not Started",
- "2": "Cancelled",
- "3": "In Progress",
- "4": "Paused"
- };
- return a[v] || "";
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement