Forum Stats

  • 3,840,112 Users
  • 2,262,568 Discussions
  • 7,901,153 Comments

Discussions

Interactive grid - reaching data from other item

User_FVLG7
User_FVLG7 Member Posts: 6 Green Ribbon

Hello,

I'm having two editable IG on one page and would like some buttons that would give me an option to make some database changes in a data combined with selected rows of IG. Unfortunately all examples from the internet are based on "SelectionChange - IG" dynamic actions and I'm not able to convert them to work with "Click - button" dynamic action.

Example:

var i, i_empids = ":", i_empid,
model = this.data.model;
for ( i = 0; i < this.data.selectedRecords.length; i++ ) {    
    i_empid = model.getValue( this.data.selectedRecords[i], "EMPLOYEE_ID");    
    i_empids += model.getValue( this.data.selectedRecords[i], "EMPLOYEE_ID") + ":";    
}

apex.item( "P9_EMPIDS" ).setValue (i_empids);
apex.item( "P9_CURRENT_EMPID" ).setValue (i_empid);

I don't now how to right declare IG object in JS, so I could change "this" object (will it work?). Maybe there're some other options?

Can You help me?

Tagged: