Announcement

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

    Selecting a row in ListGrid with expansion enabled and selection appearance checkbox

    Hello,

    I ran against a problem where it seems to be impossible to select a listgrid row with the keyboard when the grid has expansion enabled. It works again when I disable the expansion functionality (eg the spacebar selects the checkbox).

    This can be illustrated with a variant of one of the grid samples (http://www.smartclient.com/smartgwt/...checkboxselect).

    We are on SNAPSHOT_v8.3d_2012-07-03/Pro Deployment (built 2012-07-03).

    This is the relevant code building the canvas:
    Code:
    	@Override
    	public Canvas getViewPanel() {
    		
    
           Canvas canvas = new Canvas();  
      
            final ListGrid countryGrid = new ListGrid();  
            countryGrid.setWidth(500);  
            countryGrid.setHeight(224);  
            countryGrid.setShowAllRecords(true);  
            countryGrid.setSelectionType(SelectionStyle.SIMPLE);  
            countryGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);  
      
            ListGridField countryCodeField = new ListGridField("countryCode", "Flag", 40);  
            countryCodeField.setAlign(Alignment.CENTER);  
            countryCodeField.setType(ListGridFieldType.IMAGE);  
            countryCodeField.setImageURLPrefix("flags/16/");  
            countryCodeField.setImageURLSuffix(".png");  
      
            ListGridField nameField = new ListGridField("countryName", "Country");  
            ListGridField capitalField = new ListGridField("capital", "Capital");  
            ListGridField continentField = new ListGridField("continent", "Capital");  
            continentField.setHidden(true);
            continentField.setAttribute("selectedCountriesGrid", true);
            countryGrid.setFields(countryCodeField, nameField, capitalField, continentField);  
            
            countryGrid.setExpansionMode(ExpansionMode.DETAIL_FIELD);
            countryGrid.setDetailField("continent");
            countryGrid.setCanExpandRecords(true);
            
            countryGrid.setData(CountryData.getRecords());  
      
            canvas.addChild(countryGrid);  
            
      
            canvas.draw(); 
            
            return canvas;
    	}
    How can I enable keyboard access to this kind of use case?

    thanks!
    Last edited by Isomorphic; 16 Jul 2012, 13:53. Reason: formatting code block

    #2
    We've made a change to the 3.1d branch to support this. Please try the next nightly build (July 17 or greater) and let us know if continues not to work for you

    Thanks
    Isomorphic Software

    Comment


      #3
      Thanks, we will be trying that.

      Comment


        #4
        This is also working now, thanks!!

        Comment

        Working...
        X