Checkbox in a multi row block and scroll bar [message #354273] |
Fri, 17 October 2008 05:25 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rajy_salim
Messages: 204 Registered: January 2008 Location: Beirut - Lebanon
|
Senior Member |
|
|
Dear,
I have a multi row datablock with scroll bar. In each record I have a checkbox (let's call it check_record), and above these checkboxes, there is a checkbox to check/uncheck all the checkboxes (let's call it check_all).
If all the "check_record" are checked, the "check_all" must be automatically checked, else if one "check_record" is not checked, it will be unchecked.
To do that, I have put a loop in the WHEN-CHECKBOX-CHANGED of "check_record" to loop over all the "check_record" and see if they are checked or not.
Normally, this loop will automatically go to last record. But to go back to the selected record (where the "check_record" was clicked), I have used go_record with the record ID.
==> No problem in that, it's working fine.
Now, this is my problem:
When clicking on a "check_record", the scroll bar moves to show the selected row in the first (or last) VISIBLE row in the data block, and that's because of using "GO_RECORD(<CURRENT_RECORD>)".
Example: if I select the third record in the data block, the scroll bar moves to show it in the first visible row.
Is there a way to "freeze" the scroll bar and keep the record in its initial position in the data block??
Many thanks!
Rajy
|
|
|
|
|
Re: Checkbox in a multi row block and scroll bar [message #354404 is a reply to message #354273] |
Sat, 18 October 2008 08:46 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
madhuribondre
Messages: 3 Registered: October 2008
|
Junior Member |
|
|
Hi,
Other alternative could be as below:
1. Set the value of check_record when unchecked to 1 and when checked to 0
2. Create new summary item having sum of check_record
3. If Summary item value is > 0 means there are unchecked rows else all the rows are checked in block.
4. value of check_all can be set on the basis of this new summary item.
HTH
Madhuri
|
|
|
|
|
|
|