on 01-14-2015 4:19 PM
Hi Experts,
The image underneath illustrates my problem:
I have a table element on my form and the header of that table is the header (3lines with on every line a single textfield) of every page in case of overflow.
If the value of the textfield on line 2 is empty it should be hidden and the blank line should be hidden.
To achieve this, I've created a flowed top to bottom layout and I've written JavaScript coding to hide the field when its NULL.
When I have a form which consists of 2 pages, the header of the first page scales correctly (Line 2 is hidden and does not reserve any space).
However on the next page (or subsequal pages), Line 2 is hidden since the caption of the textfield is not displayed, BUT the space is still reserved and the header is not resized.
Any of you have an idea how to solve this?
Thanks in advance for your help.
Kind regards,
Niels De Greef
Hello Niels,
In which event you have written the JavaScript? Initialize event OR Layout Ready event?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Niels,
Yes. I know the problem is not with hiding the field but with shrinking of the sub forms. I asked that question because, in Ready Layout event, even if the field is hidden, the co-ordinates wont change and the sub form won't shrink(as the name suggests the layout is ready and co-ordinates wont change). But in Initialize event, the co-ordinates change and even the sub form shrinks when a field is hidden. But you are telling that you tried both the events but had no success. May be because you have used the Table element. May be I need to check with that and come back to you.
Hi Pavan,
I indeed think that it is caused by using the table event with the repeating header.
It seems that he is hiding the fields correctly but that the layout was already rendered before or something and can't be changed anymore, even if it's a flowed layout.
I'm trying to change the layout with some JavaScript coding (change header size, hide lines, ...) but I can't find a solution..
Kind regards,
Niels
Hi Pavan,
Thanks for your quick responses.
I tried to change the table element with subforms but now I can't get the header on every subsequent page.
I've made the following layout:
Table
- Header
Binding: Reapeat & Min count = 1
- Body (containing all other fields on form)
Pagination: Overflow leader = Header
Maybe because in my Body I also have another Table control with repeating header?
Kind regards,
Niels
Hi Niels,
I tried in a test form. I think this requirement is not possible since the overflow leader(header) needs to be positioned to get it displayed properly on subsequent pages. You cannot keep the header flowed and get it displayed correctly in subsequent pages.
Refer the link below to know why overflow leader needs to be positioned.
And later if you write the JavaScript on this Positioned header sub form to hide a particular field in it, the sub form won't shrink.
Hi Pavan,
I indeed think that it isn't possible with an overflow leader (header), that's why I tried to achieve it with a table control.
But I think this isn't going to work either.
I tried to bind the lines dynamically with a DATA subform from the data view but in the subsequent pages, he doesn't display the dynamic data.
Same for resizing the header, the first page he resizes correctly, but on the subsequent pages he does not want to resize the header.
Thanks for your help.
Kind regards,
Niels
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.