05-12-2011 07:12 AM
I have created a table in my application with fixed left column (left most column is fixed and remaing columns are scrollable from left to right). is it possible to create a table with both fixed heading and fixed left column ?
Assume there are 10 columns and 50 rows in my tables and only 3 columns and 15 rows are visiable at a time on screen
(1) when user scroll from left to right only left most columns should be fixed. both table heading and remaing column scroll from left to right and vice versa. also
(2) when user scroll from top to bottems only top most heading should be fixed and remaining all rows(with left most column) should be scrollable.
I am able to implement any one point from above but not both. Please suggest
Solved! Go to Solution.
05-12-2011 07:29 AM
In my opinion, this is not possible using Field Managers. I think you will have to code this yourself. I would consider using a TableLayoutManager for the whole Table, and fake the scrolling by repopulating the displayed cells appropriately.
05-12-2011 07:49 AM
Thank for quick response.
"fake the scrolling by repopulating the displayed cells appropriately".
If i repopulate the value in cell when user scroll, shell I get the scrolling effect properly like it show only half cell when user scroll half of the cell.
Also to implement this solution I will have to override touchEvent() and add trackballListerner ?
Please explain little bit more
05-12-2011 09:13 AM
"If i repopulate the value in cell when user scroll, shell I get the scrolling effect properly like it show only half cell when user scroll half of the cell."
The approach using TablelayoutManager would display single cells and the scrolling would be cell at a time. And yes you would have to override navigationMovement and the appropriate TouchEvent methods n your TableLayoutManager so that it knew when it has to repopulate the cells.
One other alternative is to have four Managers, one to do the the top left corner (the dead corner), one to do the top row (column headings), one to do the left hand column (row Headings) and one to do the rest (data). Place all of these in a tricky row and header manager. Only allow the user to scroll the data part. Have the tricky manager listen for scroll events. Then have the tricky manager add and remove the dummy, column and row header Managers as appropriate. note that these heading Fields would not be nicely scrolled, they would either be there or they would not be displayed. That would give you your 1/2 a cell scrolling . And you would not have to override anything to detect movement, you would left the scroll listener do that for you.