Disable Checkbox [message #563578] |
Wed, 15 August 2012 05:42 |
|
abdulaziznh
Messages: 8 Registered: August 2012 Location: KSA
|
Junior Member |
|
|
Hi i have a multirecords form and i made a main checkbox which will select/ unselect all records
CODE:
begin
go_block('ATTENDANCE');
FIRST_RECORD;
if :MAIN_CHECKBOX.MAIN_CHECK_BOX = 'Y' then
loop
:ATTENDANCE.SIGGNED := 'Y' ;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
end loop;
else
loop
:ATTENDANCE.SIGGNED := 'N' ;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
end loop;
end if;
FIRST_RECORD;
end;
now there is a button that i should be hit after selection to disable "lock" selected records and some selected item (i.e: main checkbox)
i used:
SET_ITEM_PROPERTY('MAIN_CHECKBOX.MAIN_CHECK_BOX', UPDATE_ALLOWED,PROPERTY_FALSE)
SET_ITEM_PROPERTY('MAIN_CHECKBOX.MAIN_CHECK_BOX', ENABLED,PROPERTY_FALSE)
SET_ITEM_PROPERTY('MAIN_CHECKBOX.MAIN_CHECK_BOX', INSERT_ALLOWED,PROPERTY_FALSE)
nothing work !!
I'm an IS student who is having his training in some company , so I'm not an expert or something
so, please guys if anyone have any idea that will help me i will be grateful
|
|
|
|
|
|
|
|
Re: Disable Checkbox [message #564547 is a reply to message #564541] |
Sat, 25 August 2012 07:11 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Well set_item_property always works, unless you get an error. Are you getting an error?
Have you checked there's no other code that enables the checkbox?
|
|
|
|
Re: Disable Checkbox [message #564602 is a reply to message #564572] |
Sun, 26 August 2012 08:55 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Then triple check.
There are exactly three options here:
1) You get an error when you try to disable the check box.
2) You aren't actually running code to disable the check box (code is being bypassed or references the wrong item)
3) Some other code is re-enabling it.
There are no other options.
So you need to debug your code to work out what's going on.
Run the form in debug mode or use get_item_property to check the property at various poinrs.
|
|
|
|
|