Solved

tabular form items read only based on click event

Posted on 2012-04-04
5
859 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
5 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Comment Utility
You can also set the update_allowed item-property to No
0
 

Author Comment

by:vsarma50
Comment Utility
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
Comment Utility
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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now