Friday 13 December 2019

apex widget tabular addrow

apex widget tabular addrow

In this post , we will be discuss about the apex widget tabular form. apex widget tabular form has the feature which allows users to update multiple rows in a table using only declarative programming.Apex widget tabular form is very useful and the powerful tool. In back-end of the apex widget tabular form , most of the work handled by the Java script and the PL SQL scripts. Here below i will share the detail steps and explanation about apex widget tabular addrow.

apex widget tabular addrow

Step by Step to create apex widget tabular addrow

Step1:- Go to Apex environment and go to your page. 

Step2:- To Create apex widget tabular form 

Go to Create Region -> Form -> Tabular Form . 

Tabular form wizard will guide you through the process of selecting the table and columns, choosing a primary key, choosing columns to update, and adding buttons and branching. 

Run the page, and you find that the tabular form lets you scroll thru every row in the table.  Pretty cool, but maybe you only want a subset of the rows?   So your page has an ID field, and you modify the tabular form with the WHERE clause

select rowid,            /* Apex generates the select */
       table_key,
       table_col1,
       table_col2,
       table_colx 
 where table_key = :id   /* You add the where clause */


Step3:- So, we will execute the JavaScript addRow function when the page loads by using a dynamic action.  

Here's how to do it: 

create a new dynamic action and name it Add_1_Row.Click Next.  

The Event should be Page Load,   don't choose a Condition, and click Next.  

The Action should be Execute JavaScript Code,   the code should be
 javascript:apex.widget.tabular.addRow();  
and click Next.

 Then click Create Dynamic Action.

We need to Create a function in page header as

function addRowTop() 

{


apex.widget.tabular.addRow();


apex.jQuery(apex.widget.tabular.gTabForm).find("tr").last().insertBefore(apex.jQuery(apex.widget.tabular.gTabForm).find("tr").first());




Step4:- After these steps , User will also have the blank row to enter data. If you want to add more then one row , Click on the add row button to add next line or row in the table in apex tabular.

apex widget tabular addrow
apex widget tabular addrow

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *