1. #1
    Sencha User
    Join Date
    Feb 2013
    Location
    Lawrence, KS, USA
    Posts
    25
    Answers
    2
    Vote Rating
    0
    jasewell is on a distinguished road

      0  

    Default Answered: Number of rows currently visible in grid

    Answered: Number of rows currently visible in grid


    Does Ext.grid.View have an easy way to get an answer to the question "Given the current layout of this grid, how many rows are there room to display?"

    Thanks in advance.

  2. I was thinking of the questions as different in that if you weren't grouping or didn't have variable-height rows you could just divide view height by row height and know what could be in the view, but if the view was rendered with rows and had several grouped headers with custom css in a grouping tpl then the number of actual rows visible in the view -vs- the number of possible rows in a view would be different.

    While there's not a convenience method for grabbing the rows in view you could loop through the view's nodes and get their region and see if the region intersects with the view's region to see if the node is currently visible.

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    It's possible I'm over-simplifying here, but first thought that comes to mind is view.getHeight() / 21.

  4. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    Lawrence, KS, USA
    Posts
    25
    Answers
    2
    Vote Rating
    0
    jasewell is on a distinguished road

      0  

    Default


    Quote Originally Posted by slemmon View Post
    It's possible I'm over-simplifying here, but first thought that comes to mind is view.getHeight() / 21.
    I could do something like that, yeah. We make a lot of use of the grouping and groupingsummary features, which would complicate things a bit, but it's still a solvable problem. I hate to do something like that and then find out that there's a built in method that already does what I need, though, hence the question. So it sounds like the answer to the original question is "No"?

  5. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I don't believe there is, no. I did some looking last night in the API to make sure I wasn't missing something, but just to clarify, you were asking "how many rows are there room to display". Are you instead looking more for "how many rows (not including grouping rows) are currently displayed"?

  6. #5
    Sencha User
    Join Date
    Feb 2013
    Location
    Lawrence, KS, USA
    Posts
    25
    Answers
    2
    Vote Rating
    0
    jasewell is on a distinguished road

      0  

    Default


    Quote Originally Posted by slemmon View Post
    I don't believe there is, no. I did some looking last night in the API to make sure I wasn't missing something, but just to clarify, you were asking "how many rows are there room to display". Are you instead looking more for "how many rows (not including grouping rows) are currently displayed"?
    I think that's an equivalent question, provided we don't count rows you'd have to scroll down to see as "displayed".

  7. #6
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I was thinking of the questions as different in that if you weren't grouping or didn't have variable-height rows you could just divide view height by row height and know what could be in the view, but if the view was rendered with rows and had several grouped headers with custom css in a grouping tpl then the number of actual rows visible in the view -vs- the number of possible rows in a view would be different.

    While there's not a convenience method for grabbing the rows in view you could loop through the view's nodes and get their region and see if the region intersects with the view's region to see if the node is currently visible.

  8. #7
    Sencha User
    Join Date
    Feb 2013
    Location
    Lawrence, KS, USA
    Posts
    25
    Answers
    2
    Vote Rating
    0
    jasewell is on a distinguished road

      0  

    Default


    Quote Originally Posted by slemmon View Post
    While there's not a convenience method for grabbing the rows in view you could loop through the view's nodes and get their region and see if the region intersects with the view's region to see if the node is currently visible.
    I hadn't thought of that, thanks!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi