cancel
Showing results for 
Search instead for 
Did you mean: 

check box with in tableview

Former Member
0 Kudos

Hi All,

I have placed checkbox with in table view using iterator.But the check box is getting right or left aligned acooring to the type of the filed .I want it ot be placed at the center of the cell always.How can i do it?

Thanks

Sujith

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sujit ,

did u use the tble view like this..

<htmlb:tableView id="table"

selectedRowKeyTable = "<%= selectedrowindextable %>"

onRowSelection = "MyEventRowSelection"

selectionMode = "MULTISELECT"

table="<%=i_tab%>"

>

Cud u send ur code ?

Rgds,

Jothi.

Former Member
0 Kudos

This is the code which i am using.I am using checkbox for the column flag1 using iterator this check box getting aligned left as it char type.

<htmlb:tableView id = "tv1"

visibleRowCount = "10"

selectionMode = "lineEdit"

table = "<%= it_tableview %>"

iterator = "<%= iterator %>">

<htmlb:tableViewColumns>

<htmlb:tableViewColumn columnName = "name"

wrapping = "false"

width = "110"

title = "Name"

edit = "true"

type = "text" >

</htmlb:tableViewColumn>

<htmlb:tableViewColumn columnName = "flag1"

wrapping = "false"

width = "70"

title = "check1"

edit = "true"

type = "text" >

</htmlb:tableViewColumn>

<htmlb:tableViewColumn columnName = "flag2"

wrapping = "false"

width = "110"

title = "check2"

edit = "true"

type = "text" >

</htmlb:tableViewColumn>

<htmlb:tableViewColumn columnName = "value"

wrapping = "false"

width = "110"

title = "valuecell"

edit = "true"

type = "text" >

</htmlb:tableViewColumn>

</htmlb:tableViewColumns>

athavanraja
Active Contributor
0 Kudos

<htmlb:tableViewColumn columnName = "flag1"

wrapping = "false"

width = "70"

<b>horizontalAlignment = "TRUE"</b>

title = "check1"

edit = "true"

type = "text" >

but i would not mix tableview iterator and tableviewcolumns

Regards

Raja

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

for the checkbox column in the iterators IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS method

set HORIZONTALALIGNMENT = 'center' .

Regards

Raja

Former Member
0 Kudos

Hi,

i am defining colums using IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS this mehod.I am specifying the columns with in htmlpage.Thanks for the reply.how can do in this case.

Thanks & regards

Sujith

athavanraja
Active Contributor
0 Kudos

in if_htmlb_tableview_iterator~get_column_definitions.

method

FIELD-SYMBOLS: <def> LIKE LINE OF p_column_definitions.

APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.

<def>-columnname = 'flag1'.

<def>-title = 'Column header' .

<def>-horizontalalignment = 'center'.

Regards

Raja