Author Topic: Liquid UI Table - Clear table row selection  (Read 8064 times)

rajesh.sabbineni

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 26
    • View Profile
Liquid UI Table - Clear table row selection
« on: August 04, 2017, 03:40:09 PM »
Purpose:
Clear table row selection of a Liquid UI table.


Liquid UI Code:

// SAPLSMTR_NAVIGATION.E0100.sjs

// User Interface
del("X[IMAGE_CONTAINER]");

item_array = ['10','20','30','40'];
material_array = ['L-10Y','100-300','L-80F','CP-100'];
plant_array = ['1000','1200','1200','1000'];
      
table([1,3], [10,27], {"name":"z_table", "title":"Material List","rows":100, "singlerowselection":true,"readonly":true});
column("Item", {"position":1,"table":"z_table","name":"z_itemcolumn", "size":4,"readonly":true});
column("Material", {"position":2,"table":"z_table","name":"z_matcolumn", "size":9,"maxlength":18,"readonly":true});
column("Plant", {"position":3,"table":"z_table","name":"z_plantcolumn", "size":4,"readonly":true});      

pushbutton( [1,30], "Clear Selection",{ "process":deSelect});

for(j=0;j<material_array.length;j++){
   z_table.z_itemcolumn[j] = item_array[j];
   z_table.z_matcolumn[j] = material_array[j];
   z_table.z_plantcolumn[j] = plant_array[j];      
}

// Function to clear the row selection
function deSelect(){
onscreen '*'
   for(j=0; j<item_array.length; j++){   // Deselect line items
      z_table.selectedrows[j] = " ";
   }
   enter('?');   

}

See attachments for code samples!
« Last Edit: August 07, 2017, 03:47:01 PM by rajesh.sabbineni »