cancel
Showing results for 
Search instead for 
Did you mean: 

table UI element

Former Member
0 Kudos

hi,

i have a table ui element ..with 3 columns( name , id , address) and 3 inp field cell editor are present all read only.... the table gets populated with records on click of a button..

my question is ..can i fix the length of the cell editors to 20characters..eg: in address column only 20charactors of the address gets displayed and to see the full address the user has to scroll...

pls help.

Regards,

Anurupa

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This is from the online help:

If a Table contains an InputField, the InputField fills its table cell horizontally. For this reason the width property is not used in this instance. Instead, the width of the InputField is set to 100 % of the width of the TableColumn.

For this reason you should use the width property of TableColumn if you want to have a different width for the InputField.

However the width property of the inputField or the TableColumn only controls the displayed width of the UI element. To control the number characters that can input, you should use the underlying context. Whatever the length specification of the underlying context attribute is will be used to control the number of characters that can be input. Avoid the use of generic types like STRING if you want to control the number of characters. Instead use Data Dictionary Element Types.

Former Member
0 Kudos

Hi Thomas ,

Thanks for the reply,

When i change the type of the context element from string to char20 ( as i want to display 20 characters) the rest of the address in the address field of the table is getting truncated ... my requirement is that the entire address should be present in the field but only 20 chars are displayed..if the user wants to check the whole address he has to scroll horizontally on the input field cell editor (read only).

is this possible??

regards

Anurupa.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

If you only want to change the display size and not the input lenght then you should resort back to the width specifiction. As I stated earlier, the cell editor widht column is override by the table column width. Now setting the width property to only allow 20 characters is going to be tricky. You have the CSS Units of Measure for width:

http://www.devx.com/projectcool/Article/19850

As you see most of these are not tied to the number of characters but units of actual or percentage length. Different font sizes are going to effect the output lenght. EM seems to be the only one tied to font, so you might start there.