Solved

tabular form items read only based on click event

Posted on 2012-04-04
5
908 Views
Last Modified: 2012-06-27
Hi,

I am having a tabular form. I want to make 2 columns as read only. But when we

add a new row by clicking the Add Row button these columns will be editable for that particular row. After

adding the data and press the submit button that 2 columns will be changed to read only. Is there any way to

achieve this. Please advice.

Thanks,
0
Comment
Question by:vsarma50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37807105
Since this was posted in an Oracle zone can I assume Oracle Forms?

Have you tried Set_Item_Instance_Property?

See if the examples here help:
http://www.orafaq.com/forum/t/88377/2/
0
 
LVL 20

Expert Comment

by:flow01
ID: 37807185
You can also set the update_allowed item-property to No
0
 

Author Comment

by:vsarma50
ID: 37807215
I apologize of not specifying in detail.
it is in APEX 4.0.  and I have a tabular form and a master detail form
with some rows in it . when I click create/add row button
the two items should be come editable else should be read only on page load.
thanks.
0
 
LVL 20

Accepted Solution

by:
gatorvip earned 500 total points
ID: 37807590
You can do it via JavaScript. In the region footer, add the following code (change "f02" to whatever array you are using):

<script type="text/javascript">
var f2=document.getElementsByName("f02");
for (var r = 0; r < f2.length; r++)
{
   if(f2[r].value != "")
   {
      f2[r].disabled=true;
   }
}

</script>

Open in new window

0
 

Author Closing Comment

by:vsarma50
ID: 37807781
Perfect solution. thanks very much
Iam new to apex and working first time on it.
I was struggling for this since 2 days
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question