on 09-10-2013 12:26 PM
Hello Everyone,
Basic premise of my work:
I am working on a UI which is basically a message comparison UI. Something like a diff for certain kind of messages of various version. For each version I am displaying message in two different tables. Both these tables are aligned next to each other so that the row with different values are shown in red.
One requirement is to have scrolling in such a way that the alignment of these messages are not disturbed.
The data which is coming is more than the scrollable row count. But, I don't want to use the table scroll options. I want to use the scroll option which is provided by the browser. I have tried using the Table inside a Scrollable Container with various options but it is not working.
Is this possible to achieve? Kindly help.
Thanks & Regards,
Ruchir
Hi Ruchir
If those tables are not so big (up to about 50 rows*) then you can use the following:
- Leave the tables in the scrollable container (not necessary - I think it would be nicer)
- Create an attribute of type int
- Bind that attribute to the VisibleRowCount parameter of the ui table element
- in code, after getting data for tables, give that attribute the value of the number of rows in the table (node.size() or if it's a dynamic table - make it a calculated attribute)
- Do the same for second table.
The idea is to show all rows of the tables all the time - when they are in the scrollable container then the scrolling or the container moves both tables. If you don't leave them in the container the view stretches out of screen limits and the scrolling is done in browser.
*You can try it with bigger tables - I'm not sure about the exact number
Good luck
Shai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shai,
Thanks for quick response.
This method works partially. This means for smaller tables this seems to be working correctly. But the messages I am comparing are dynamic. Most of them are working but the tables with more than 200 visible row count are putting the scroll bar in the individual tables on their own.
Is it possible even for cases in which number of visible rows are more than 200.
Thanks & Regards,
Ruchir
Wrap your table in scroll container and make property of scolling mode to none for removing scroll bar for that contained table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ruchir,
I believe there is a property for the table named as Scrollable mode.May be binding the integer attribute to the visible no of rows property and scrollable mode property set as false will help .
Please try and let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.