Announcement

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

    Expand a Row in ListGrid cannot hide case

    Refer to the sample in the showcase, and learn how to expand a row in ListGrid,

    http://www.smartclient.com/smartgwt/...grid_memo_rows

    From the example, it will show the "background" field when the row is expanded. I want to ask if I have real use case that some row have no "background" value, can I hide the arrow?
    We want to make it use friend so that user don't need to click every arrow to check whether the "background" value here or not ...


    Code:
            ListGrid listGrid = new ListGrid() {  
                @Override  
                protected Canvas getExpansionComponent(ListGridRecord record) {  
                    Canvas canvas = super.getExpansionComponent(record);  
                    canvas.setMargin(5);  
                    return canvas;  
                }  
            };  
            listGrid.setWidth(600);  
            listGrid.setHeight(500);  
            listGrid.setCanExpandRecords(true);  
            listGrid.setExpansionMode(ExpansionMode.DETAIL_FIELD);  
            listGrid.setDetailField("background");  
      
            ListGridField nameField = new ListGridField("countryName", "Country");  
            ListGridField capitalField = new ListGridField("capital", "Capital");  
            ListGridField continentField = new ListGridField("continent", "Continent");  
            listGrid.setFields(nameField, capitalField, continentField);  
      
            listGrid.setData(CountrySampleData.getRecords());  
      
            listGrid.draw();
Working...
X