cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed lenght of tableview column

Former Member
0 Kudos

Hi

i have a tableview & i have used Wrapping attribute in the Tablecolumn since my tableview columns contain data of string type and it's working fine.<b>I want to prevent the horizontal scrolling of my page so that i can print it.</b>

I have tried by setting WIDTH in tableview column & in TableviewIterator's render cell start too.But none of it solved my issue.

Plz help me in this regard.

Thanks ,

JBP.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Did you try FIXEDCOULMN attribute of TABLEVIEWCONTROL structure. I am not sure how this will work but its just a suggestion.

Cheers

Former Member
0 Kudos

check if this helps

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

how the tables width set?

in the iterator for that column what control are you using? a textview? did you set the wrapping attribute of that as well

Regards

Raja

Former Member
0 Kudos

Hi raja,

This is the code i have used in the method if_htmlb_tableview_iterator~get_column_definitions .

<i>

data tv_column type tableviewcontrol.

tv_column-columnname = 'OBJECTIVES'.

tv_column-title = 'Work Goal & KPI'.

tv_column-width = "200".

tv_column-wrapping = "TRUE" .

tv_column-oncellclick = 'status_clicked'.

append tv_column to p_column_definitions.

</i>

Still the problem persists.Could you help me with the sample code ?

~JBP.

athavanraja
Active Contributor
0 Kudos

data tv_column type tableviewcontrol.

tv_column-columnname = 'OBJECTIVES'.

tv_column-title = 'Work Goal & KPI'.

tv_column-width = "200".

<b>tv_column-wrapping = "X" .</b>

tv_column-oncellclick = 'status_clicked'.

append tv_column to p_column_definitions.

and in the iterator for the textview also you have to set the wrapping attribute.

MOVE: 'This is for testing. This is for testing. this is for testing . this is for testin</font>' TO wf_text .

p_replacement_bee = cl_htmlb_textview=>factory(

id = p_cell_id

text = wf_text

wrapping = 'TRUE'

width = '200' ).

Regards

Raja

Former Member
0 Kudos

Raja,

I am using the foll code in my tableview iterator

<b>if_htmlb_tableview_iterator~get_column_definitions .</b>

<i>

data tv_column type tableviewcontrol.

tv_column-columnname = 'OBJECTIVES'.

tv_column-title = 'Work Goal & KPI'.

tv_column-width = '200'.

tv_column-wrapping = 'X' .

tv_column-oncellclick = 'status_clicked'.

append tv_column to p_column_definitions.

</i>

and in

<b> method if_htmlb_tableview_iterator~render_cell_start .</b>

<i>

when 'OBJECTIVES' .

data: wf_text1 type string .

assign component p_column_key of structure <fs> to <l_field>.

wf_text1 = <l_field>.

p_replacement_bee = cl_htmlb_textview=>factory(

id = p_cell_id

text = wf_text1

wrapping = 'TRUE'

width = '200'

).

</i>

But Still the problem persists..

Rgds,

JBP.

athavanraja
Active Contributor
0 Kudos

is your text in wf_text1 is longer than 200 characters, only then you will see the wraping happenning. if not set the width accordingly

I have tested this and it works fine.

Regards

Raja

Former Member
0 Kudos

Yes. it's greater than 200 chars.but it doesn't work.

and the table shirnks and enlarge(at this time horizontol scroll appears) for different set of values.How come it differs for different input?

I don't know where i gone wrong.Cud you tell me what are the attributes i have to set in my tableview,tableiterator-column,tableiterator-cell...

Rgds,JBP.

athavanraja
Active Contributor
0 Kudos

apart from the ones (column control and iterator cell_start ) the only other relevant setting is table width which i have set it as 100% in htmlb:tableView

Regards

Raja

Former Member
0 Kudos

sorry,it doesn't work even after i set table width = 100%.

Could you please send me the code ?

my id: jothiban@indiatimes.com

Rgds,JBP.

Message was edited by: P24101990