cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying the table based on number of records.

Former Member
0 Kudos

Hi Experts,

I want to display a normal table based on the records, if there is only one record then only one row should be displayed on the table, if there are 2 records then 2rows should be displayed on the table with the data, if they are more than 2 records only 2 rows should be displayed on the table and remaining rows should be able to scroll on the table.

Please Provide the requried infformation.

Thanks & Regards.

Bhushan.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member199125
Active Contributor
0 Kudos

First read the number of elements in your node using get_element_count ( ) method.

if count =1

the se the number of visible row = 1.

elseif count >= 2

number of rows = 2.

endif

regards

Srinivas

Former Member
0 Kudos

Hi Bhushan

Considering the example you have mentioned you can set the visibibleRowCount of the table to 2 and uncheck the displayEmptyRows property. This way, if you have 1 record then only one row will be displayed, for two only two rows and a scroll bar for more than two rows.

You can generalise this to display number of rows you want to see at a time. Hope this helps.

Thanks & Regards,

Gayathri Shanbhag

Former Member
0 Kudos

Hi Gayathri Shanbhag,

Thanks for reply its working, but i need row scroll on the table .

Thanks & Regards.

Bhushan.

Former Member
0 Kudos

Hi Bhushan

What exactly is row scroll? Did you not refer to the vertical scrollbar that appears when the number of rows is more than the number of displayed rows? Please clarify

If it is the vertical table scroll bar you refered to then you will get it if the number of records are more than the visibleRowCount you set

If it is the horizonal table scroll bar you refered to then you will get it by setting a fixed width to the table. If your column(s) value width exceeds the table width you have specified, you get the horizontal scrollbar.

Regards,

Gayathri Shanbhag