Child Table row trigger

is that any javascript can do something when first row of child table “item_group” click, then…

there is function like cur_frm.cscript.item_group = function (doc, cdt, cdn) which can trigger whenever the child table field “item_group” is click, but i can’t determine which row is click…

Your help and reply is greatly appreciated.

I’m not quite sure what you meant. See if this can help:

 frappe.ui.form.on('ParentDoc', {
     // handle parent form  
 })
  
 frappe.ui.form.on('ChildDoc', {
   fieldname: function(frm, cdt, cdn) {
      var row = frappe.get_doc(cdt, cdn);

      // handle childtable
      // do something with the row when fieldname is changed
   }
 });

Original poster was asking about an “on click” trigger for field in child table. The given answer addresses “on change” trigger.

How does one perform prevent default “on click” behavior and fire customer javascript insetad?