Thursday, 29 December 2016

Displaying of a select list and a button based on conditions in one Tabular Form Column

For already existing records in data base a select list must display, and for newly added records a button must display for deleting the newly added record
Resolution Steps:
Create a dynamic action on clicking of add_row button as
var $tr = $("TABLE[summary='Form on Vehicle Parts']>tbody tr:last");
if (parseInt($("#P5_VEHICLE_TYPE").val(), 10) == 0) {
    alert("Please select any one of the Vehicle Type from the list.");
else {
    apex.widget.tabular.addRow(); // Adds NewRow

    $tr = $("TABLE[summary='Form on Vehicle Parts']>tbody tr:last");
    $("td[headers='ACTIVE_STATUS'] SELECT", $tr).css({display: "none"});
    $("td[headers='ACTIVE_STATUS']", $tr).append('<button class="uButton" onclick="$(this).closest(\'tr\').remove();" type="button"><span>Delete</span></button>');

It includes region name in summary

A.Arun Kumar

No comments:

Post a Comment