Announcement

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

    Calling ListGrid.focus() enforce scroll to first row

    I'm trying last nightly build of smartgwt 4.0p from 2013-11-05. If I have ListGrid scrolled to specific row and call focus() on it, the body of the listgrid crolls to the first row. Tested in last versions of FF and Chrome and IE10. Here is example:
    Code:
    final ListGrid lg = new ListGrid();
    lg.setSelectionType(SelectionStyle.NONE);
    lg.setWidth(300);
    lg.setHeight(100);
    
    ListGridField f1 = new ListGridField("f1");
    ListGridField f2 = new ListGridField("f2");
    ListGridField f3 = new ListGridField("f3");
    
    lg.setFields(f1, f2, f3);
    
    ListGridRecord data[] = new ListGridRecord[100];
    
    for (int i = 0; i < 100; i++) {
    	data[i] = new ListGridRecord();
    	data[i].setAttribute("f1", "f1 - " + i);
    	data[i].setAttribute("f2", "f2 - " + i);
    	data[i].setAttribute("f3", "f3 - " + i);
    }
    
    lg.setData(data);
    lg.addDrawHandler(new DrawHandler() {
    	
    	@Override
    	public void onDraw(DrawEvent event) {
    		lg.scrollToRow(30);
    		lg.focus();
    	}
    });
    
    lg.draw();
    The previos build that I used (4.0p_20130905) works correctly.

    Thanks.
    Pavel

    #2
    We've made a change to address this issue. Please try the next nightly build, dated Nov 7 or above

    Regards
    Isomorphic Software

    Comment

    Working...
    X