EasyUI Forum
September 18, 2024, 07:49:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Listen to a change in propertygrid value  (Read 3273 times)
WizPS
Jr. Member
**
Posts: 67


View Profile
« 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".
Code:
{
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!
Logged
jarry
Administrator
Hero Member
*****
Posts: 2274


View Profile Email
« Reply #1 on: December 19, 2020, 07:08:28 PM »

Please listen to the 'onEndEdit' or 'onAfterEdit' events on the propertygrid. Try this code.
Code:
$('#pg').propertygrid({
onEndEdit: function(index,row){
if (row.name == 'From date'){
//...
}
}
})
Logged
WizPS
Jr. Member
**
Posts: 67


View Profile
« Reply #2 on: December 22, 2020, 08:49:30 AM »

Wonderful, works perfectly well. Thanks!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!