Title: Listen to a change in propertygrid value
Post by: WizPS on December 19, 2020, 09:25:03 AM
Is there a way to listen for a change of a value in propertygrid? In this case I want the grid report to the right to be refreshed when there is a change to the "From date". { title: '', iconCls: 'stair-small' , showGroup: true , columns: [[ { field: 'name', title: 'Name', width: 130, sortable: true } , { field: 'value', title: 'Value', width: 130, resizable: true, align: 'left' } ]] , data: { "rows": [ { name: "From date", value: nextdate, editor: "datebox" } , { name: "User", value: '', editor: "" } , { name: "FX-board members", group: 'Send changes via mail to', value: 'On', editor: { type: 'checkbox', options: { on: 'On', off: 'Off' } } } , { name: "System-owners", group: 'Send changes via mail to', value: 'On', editor: { type: 'checkbox', options: { on: 'On', off: 'Off' } } } , { name: "SC-controllers", group: 'Send changes via mail to', value: 'On', editor: { type: 'checkbox', options: { on: 'On', off: 'Off' } } }
] } }Many thanks for advice!
Title: Re: Listen to a change in propertygrid value
Post by: jarry on December 19, 2020, 07:08:28 PM
Please listen to the 'onEndEdit' or 'onAfterEdit' events on the propertygrid. Try this code. $('#pg').propertygrid({ onEndEdit: function(index,row){ if (row.name == 'From date'){ //... } } })
Title: Re: Listen to a change in propertygrid value
Post by: WizPS on December 22, 2020, 08:49:30 AM
Wonderful, works perfectly well. Thanks!
|