Contoh Validator Pada Row Editor

editor.on('validateedit', function(row, obj, rcd, idx){
	var Harian = typeof obj.Harian == "undefined"?rcd.get('Harian'):obj.Harian;
	var Penginapan = typeof obj.Penginapan == "undefined"?rcd.get('Penginapan'):obj.Penginapan;
	var Representasi = typeof obj.Representasi == "undefined"?rcd.get('Representasi'):obj.Representasi;
	var Transport = typeof obj.Transport == "undefined"?rcd.get('Transport'):obj.Transport;
	var Jumlah = Harian + Penginapan + Representasi + Transport;
	rcd.set('Jumlah', Jumlah);
});
Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: