how i disable my textbox at view time [message #162714] |
Mon, 13 March 2006 05:29 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mfa786
Messages: 210 Registered: February 2006 Location: karachi
|
Senior Member |
|
|
hi master
Sir i have master detail form and i am not use toolbar i am usint my button add/edit/view/next/last and other
sir my requirement is all textbox disable at view time enable ony edit or inserting time
how I disable my textbox at view time and Enable only when insert or edit time.
i use this
if :system.form_status='change' then
if :system.form_status='insert' then
if :system.form_status='execute query' then
but not right work. please give my idea where i use what statment. send me sample
Aamir
[Updated on: Tue, 14 March 2006 16:47] by Moderator Report message to a moderator
|
|
|
Re: how i disable my textbox at view time [message #162827 is a reply to message #162714] |
Mon, 13 March 2006 14:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
RJ.Zijlstra
Messages: 104 Registered: December 2005 Location: Netherlands - IJmuiden
|
Senior Member |
|
|
Hi,
If you doubleclick on your button 'view' then add the following code in the triggercode:
Block_Show_Only('YOURBLOCKNAME');
and the procedure is:
PROCEDURE Block_Show_Only(P_BlockNaam Varchar2) IS
v_BlockID Block;
no_block exception;
BEGIN
v_BlockID := Find_Block( P_BlockNaam);
if id_Null( v_BlockID) then
raise no_block;
end if;
-- watching only now possible
set_block_property( v_BlockID , Query_allowed, property_false);
set_block_property( v_BlockID , Delete_Allowed,property_false);
set_block_property( v_BlockID , Update_Allowed,property_false);
set_block_property( v_BlockID , Insert_Allowed,property_false);
EXCEPTION
when no_block then
Your error code;
END;
I think you can make the procedure to make the block 'normal' again according to the example above.
HTH,
Regards,
Rob Zijlstra
[Updated on: Tue, 14 March 2006 17:02] by Moderator Report message to a moderator
|
|
|