Dynamic creation of elements with conditions
Posted: Fri Mar 17, 2017 8:41 am
Hi All,
I want to achieve the following:
In a Databand, and upon a variable named Quantity, I want to display as many empty textbox as the variable says in a 10x10 structure like in the picture below.
The obvious way i came up with was to create a full 10x10 estructure and set each element with a different condition (first element will hide if Qty<1, second element will hide if Qty<2...and so on until the last element that will hide if Qty<100). Of course, in this case is more or less manageable, but imagine I had 1000 or 5000 textbox.
So my question is if there is any way to create a dynamic structure. I haven't found a way to do this in the graphic editor, and neither I have found a way to do this in the Code tab because each element condition is associated with a private method so I would need to write the 100 method conditions.
Any insight on this idea?
Thanks in advance.
Best regards.
I want to achieve the following:
In a Databand, and upon a variable named Quantity, I want to display as many empty textbox as the variable says in a 10x10 structure like in the picture below.
The obvious way i came up with was to create a full 10x10 estructure and set each element with a different condition (first element will hide if Qty<1, second element will hide if Qty<2...and so on until the last element that will hide if Qty<100). Of course, in this case is more or less manageable, but imagine I had 1000 or 5000 textbox.
So my question is if there is any way to create a dynamic structure. I haven't found a way to do this in the graphic editor, and neither I have found a way to do this in the Code tab because each element condition is associated with a private method so I would need to write the 100 method conditions.
Any insight on this idea?
Thanks in advance.
Best regards.