on 09-09-2011 11:56 AM
Hi
How to get scroll bar option in table. If the records exceeded 5 rows then the scroll bar should be enabled else the table should be showed how many records it has. Please guide me to achieve this.
Thanks in advance
Indiranjithn
Hi
If table have more than 5 rec, scrollbar get automatically.
Go to application- go to parametrs tab.
in parameter give WDTABLENAVIGATION and value is - SCROLLBAR
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You have to do this by coding.
create one attribute of type i.
Bind this table visiblerowcount property.
and in coding.. you have to findout total no of records in table.
for example..
data count type i.
count = LINES( lt_data). // it_data is internal table which is binded to table.
now count contains total no of records.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_countTYPE wd_this->Element_context-count.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
lv_count = count.
* set single attribute
lo_el_context->set_attribute(
name = `COUNT`
value = count).
Cheers,
Kris.
Move this logic to a separate method and call this method in the following placess
1. While populating the initial data for the table
2. while adding new records into the table.
3. while deleting records from the table
Since you want only 5 records max, then you should do the following check
if count > 5 .
count = 5.
endif.
BR, Saravanan
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.