cancel
Showing results for 
Search instead for 
Did you mean: 

adding bottom line border conditionally- Is it possible?

former_member637921
Participant
0 Kudos

Hello,

im displaying a table and without line border between them in the following way:

package | description | delivery

85309857450 | certain description | 8519863681

9101226450 | some description | 8517573681

. . |. . | 8517573663

. . |. . | 8517573671

9109857450 | other description | 8519863681

i would like to add a bottom border line between every package and after every line like this:

package | description | delivery

85309857450 | certain description | 8519863681

_______________________________________

9101226450 | some description | 8517573681

. . | . . | 8517573663

. . | . . | 8517573671

_______________________________________

9109857450 | other description | 8519863681

(the cells that contain the value '.' in the tables were added only for displaying this post the right way- they should be blank)

Is it possible?

Edited by: moshe reiss on Mar 2, 2011 10:16 AM

Edited by: moshe reiss on Mar 2, 2011 10:20 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mate,

I couldn't understand your table data here any ways..

If its a nested structure (table/subform) set the border to the parent table row elements.

if its like a single structure and if you need a border based on criteriea you need to script for that.

so let me know what was your design structure, and condition.

I can advice you accordingly.

Cheers,

Sai

former_member637921
Participant
0 Kudos

Hi Sai,

It's a single structure and i would like to have a border line conditionally. I can add another field to the structre (lets called it print_border of type flag), and only if it's not initial- in that line i would like to print a top border line.

Can you try to help me?

Thanks,

Moshe

Former Member
0 Kudos

Hi Moshe,

lets say you have a simple table with one header & 1 body row with 4 fields A,B,C,D.

if you want a border if A value is not null have the below javascript on form ready event of field A.

Make sure you have no borders defined for the table at any element.


if(this.rawValue != null || this.rawValue != "")
           this.parent.border.getElement("edge",2).presence = "visible"; // sets bottom border to the data row node.
/*
Note: 0 = top
1 = right
2 = bottom
3 = left */

Since I have used this property and no absolute paths, if you just copy paste my code it should work (hopefully ha ha ha).

if you need my test file give me a test mail to my ID.

Cheers,

Sai

former_member637921
Participant
0 Kudos

Worked great!

i just changed the if to:

if(this.rawValue != null || this.rawValue == "X")

'cause otherwise it printed bottom border on each line.

Thanks

Moshe

Answers (0)