3 Replies Latest reply on Dec 28, 2009 10:51 AM by Srikanth Chakravarthy

    "rows" property of Scrollabledatatable

    Srikanth Chakravarthy Newbie

      Hi,

       

      My requirement is to restrict the height of the scrollable data table by setting the number of rows to be displayed. For example if I set rows="5" then I should see only five rows displayed (including or excluding the header, however it may happen). If the list has more rows to be displayed then the vertical scrollbar should be activated.

      Even though I set the overflow property for the control to auto using CSS, it does not show the scroll bar if there are more rows to display.

       

      Currently, the scroll bar appears only if the number of rows exceed the height of the scrollable data table, even without the rows property set.

       

      Any help is appreciated.

       

      Thanks and regards,

      Srikanth

        • 1. Re: "rows" property of Scrollabledatatable
          Konstantin Mishin Novice
          If I correctly have understood your task, you may change height attribute.
          height = rows * row height
          
          1 of 1 people found this helpful
          • 2. Re: "rows" property of Scrollabledatatable
            Deb Dutta Novice

            I think , you have to give the initial height of the grid correctly as per the row calculation.

            Suppose your each row height is 20px , and header is 25px.

            and you only only to show 5 rows without any scroll ,

            so in that case give the grid height = 5*20 + 25

            Please remember rows attribute is for how many rows you want to show in a grid page. it don't have any impact in grid height , and grid height is a sepearte attribute.

             

            So in your case you have to measure how many row you want to show accordingly you just adjust your height attribute. no need to specify rows attribute.

            1 of 1 people found this helpful
            • 3. Re: "rows" property of Scrollabledatatable
              Srikanth Chakravarthy Newbie

              Hi,

               

              Thanks for your quick replies.

              It is the same workaround that I have implemented. I thought that the component should be adjusting the height based on the rowheight and the header height based on the formula given byb Deb. This expectation comes from the usage of the Microsoft Flex grid and other grid in VB6.

               

              I have not yet tried to provide the rowclasses and headerclass with specific height and check if what I expect can happen.

               

              Thanks and Regards,

              Srikanth