Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid.getVisibleRows() issue.

    Hi,

    We observe an issue for Tree.getVisibleRows(). In some conditions, the record at the margin is not visible to the user but it might still be considered as a visible record by calling Tree.getVisibleRows().

    We are using SmartClient v8.3p_2013-09-01 Build and this issue can be reproduced on both IE9 and FF12.

    Please try the following code on Feature Explorer with data source "employees" and find the attached screenshots for reference.

    Thanks!

    Steps to reproduce:

    1. Expand the root Node. (VisibleRecord1.jpg)
    2. Expand the node at the bottom of the visible part of the tree (Ralph Brogan). Scroll down to select its first child (Chase Godwin). (VisibleRecord2.jpg)
    3. Scroll up to the top of the tree. Click the "Visible Rows" button. It shows that the selected row is 12 (Chase Godwin) and the visible rows by calling TreeGrid.getVisibleRows() are [0, 12]. However, the selected record (Chase Godwin) is not visible to the user. (VisibleRecord3.jpg)

    Code:
    isc.TreeGrid.create({
        ID: "myTree",
        width: 500,
        height: 290,
        dataSource: "employees",
        autoFetchData:true,
        nodeIcon:"icons/16/person.png",
        folderIcon:"icons/16/person.png",
        showOpenIcons:false,
        showDropIcons:false,
        closedIconSuffix:"",
        fields: [
            {name: "Name", formatCellValue: "record.Job+': '+value"}
        ]
    });
    
    isc.Button.create({
    top: 320,
    title: "Visible Rows",
    click: function() {
    isc.warn("The selected row is "+myTree.getRecordIndex(myTree.getSelectedRecord())+". The visible rows are "+ myTree.getVisibleRows());
    }
    });
    Attached Files

    #2
    We see the effect you're getting, but that effect is entirely expected.

    Whilst it *looks* like that record is not visible, it actually *is* visible partially, due to the pixel height you've given the grid.

    If you reduce the height of the grid by a few pixels, you will get the numbers you expect - and you can test that this is what's happening by adding border: "none" to your treeGrid, at which time you will see the top of the selection canvas from that 12th item at the bottom of the grid
    Last edited by Isomorphic; 11 Sep 2013, 00:58.

    Comment


      #3
      Thanks for your suggestion. We will find a workaround for this case.

      Comment

      Working...
      X