on 12-07-2011 9:07 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.