1 2 3 4 Previous Next 93 Replies Latest reply: Jan 13, 2011 5:24 AM by ATD Go to original post RSS
      • 15. Re: horizontal bar Scroolling.
        ATD
        Hi Vee,

        If you re-read the thread you will see that this is for horizontal scrolling, not vertical scrolling - a HUGE difference!

        In this case, what we are doing to shifting columns from the real table into a new table to the left of that and adding a div will scrollbars onto the real table

        Andy
        • 16. Re: horizontal bar Scroolling.
          vee
          Pardon me Andy, but did u try that code ? .
          Maybe u didn't notice that I am using 'width' and 'overflow-x' properties instead of 'height' and 'overflow-y', other than this I don't think there is much difference between the two.

          Here's a screenshot
          <img src="http://img98.imageshack.us/img98/4381/reporthorizontalscroll.png" border="0" width="150" height="90" alt="Report_Horizontal_Scroll.png (24 KB)" />

          So unless my understanding of "horizontal scroll" is wrong, that code should do fine.
          • 17. Re: horizontal bar Scroolling.
            jariola
            Hi,

            Yes, nice.
            Only your pic, first column is not freeze as we talk in this post.

            Please take a look samples in this post chain
            http://htmldb.oracle.com/pls/otn/f?p=267:47
            http://actionet.homelinux.net/htmldb/f?p=100:94

            First column do not scroll

            Regards,
            Jari
            • 18. Re: horizontal bar Scroolling.
              ATD
              Hi,

              Yes, I saw the code (sorry, haven't had a chance to try it in a page) but, as Jari says, the first x columns need to be fixed so that scrolling is effective - that is, the first columns contain the key data and the user needs to scroll through the remaining columns whilst keep that key data in view.

              Andy
              • 19. Re: horizontal bar Scroolling.
                vee
                My bad then,

                Here's my updated code which freezes first column
                $('table.report-standard').after('<div class="scroll_report"><div><div style="float:left;display:inline" name="no_scroll"></div><div name="scrollable" style="float:left;display:inline;min-width: 300px; _width:300px;overflow-x: auto; max-width: 500px;"> </div><br/></div>');
                $('table.report-standard').appendTo( $('div.scroll_report div[name=no_scroll]'));
                $('table.report-standard').clone().appendTo( $('div.scroll_report div[name=scrollable]'));
                
                $('div.scroll_report div[name=no_scroll] table.report-standard').find('td,th').filter(':not(:first-child)').remove();
                $('div.scroll_report div[name=scrollable] table.report-standard').find('td,th').filter(':first-child').remove();
                $('div.scroll_report table.report-standard td').attr('nowrap', 'nowrap');
                • 20. Re: horizontal bar Scroolling.
                  jariola
                  Hi,

                  Thanks vee.
                  Do you have working sample?
                  What theme you use?
                  Any changes to report template ?

                  Regards,
                  Jari
                  • 21. Re: horizontal bar Scroolling.
                    jariola
                    Hi,

                    Thanks vee.
                    Do you have working sample?
                    What theme you use?
                    Any changes to report template ?

                    Regards,
                    Jari
                    • 22. Re: horizontal bar Scroolling.
                      jariola
                      Hi,

                      Thanks vee.
                      Do you have working sample?
                      What theme you use?
                      Any changes to report template ?

                      Regards,
                      Jari
                      • 23. Re: horizontal bar Scroolling.
                        ATD
                        Hi Jari,

                        Just change the "table.report-standard" to "table.+reportcssclassname+"

                        I've done that here: http://apex.oracle.com/pls/otn/f?p=33642:292

                        and my updated code is:
                        $('table.t12standardalternatingrowcolors').after('&lt;div class="scroll_report"&gt;&lt;div&gt;&lt;div style="float:left;display:inline" name="no_scroll"&gt;&lt;/div&gt;&lt;div name="scrollable" style="float:left;display:inline;min-width: 300px; _width:300px;overflow-x: auto; max-width: 500px;"&gt; &lt;/div&gt;&lt;br/&gt;&lt;/div&gt;');
                        $('table.t12standardalternatingrowcolors').appendTo( $('div.scroll_report div[name=no_scroll]'));
                        $('table.t12standardalternatingrowcolors').clone().appendTo( $('div.scroll_report div[name=scrollable]'));
                         
                        $('div.scroll_report div[name=no_scroll] table.t12standardalternatingrowcolors').find('td,th').filter(':not(:first-child)').remove();
                        $('div.scroll_report div[name=scrollable] table.t12standardalternatingrowcolors').find('td,th').filter(':first-child').remove();
                        $('div.scroll_report table.t12standardalternatingrowcolors td').attr('nowrap', 'nowrap');
                        Andy
                        • 24. Re: horizontal bar Scroolling.
                          ATD
                          ps

                          One thing that would/may need to be considered is row height. Some cells may wrap their text and, if the cells moved to the left are of a different height, the rows would not align properly

                          So, if you could update the jQuery to handle that, that would be good ;)

                          Andy
                          • 25. Re: horizontal bar Scroolling.
                            jariola
                            Hi,

                            Thanks Andy.
                            Do you have sample about that problem ?

                            Have you try add
                             $('table.t12standardalternatingrowcolors td,table.t12standardalternatingrowcolors th').css({"white-space":"nowrap"});
                            Regards,
                            Jari
                            • 26. Re: horizontal bar Scroolling.
                              ATD
                              I don't have an example - it was just something that occurred to me :)

                              It was something that I had to consider when doing double-scrolling (freezing columns AND rows) ages ago - but, I think, that was mainly for the column/heading widths

                              Andy
                              • 27. Re: horizontal bar Scroolling.
                                jariola
                                Hi,

                                OK.
                                One comment to your sample:
                                Column sorting will remove scroll.
                                Add dynamic action to your sample that fires JavaScript after region refresh.

                                Regards,
                                Jari
                                • 28. Re: horizontal bar Scroolling.
                                  ATD
                                  ok - done that

                                  You have to remove the script from the "Execute when page loads" setting complete - otherwise the "refresh" causes the code to run twice - not nice!

                                  So... My Dynamic Action is:

                                  Event: After Refresh
                                  Selection Type: Region
                                  Region: Employees (my report region)
                                  Condition: (None)
                                  True Actions:
                                  Action: Execute Javascript Code
                                  Code: (the original code as previously posted)
                                  Selection Type: left as "-Select Type-" (ie, no selection)
                                  False Actions: (None)

                                  And that seemed to work ok

                                  Andy
                                  • 29. Re: horizontal bar Scroolling.
                                    jariola
                                    Hi,

                                    Nice. Thanks Andy

                                    Regards,
                                    Jari
                                    1 2 3 4 Previous Next