Announcement

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

    Problem with setShowGroupSummaryInHeader(true) and recordComponent

    Hi,

    I've found some problems to show buttons in grid group header...

    If setShowGroupSummaryInHeader() is set to FALSE, my grid display
    action field with ImageButton in group summary correctly, but if I set it to TRUE, recordComponent disappear and I don't see ImageButton

    I know that my english is not well so this is my sample code:

    Code:
    ListGrid piattiGrid = new ListGrid(){  
    	@Override  
    	protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {  
    
    		if (this.getFieldName(colNum).toLowerCase().equals("action")) {  
    
    			//if(record.getIsGroupSummary()){
    			HLayout recordCanvas = new HLayout(10); 
    			recordCanvas.setHeight(35);
    			recordCanvas.setAlign(Alignment.CENTER); 
    			recordCanvas.setAlign(VerticalAlignment.CENTER);
    
    	
    			ImgButton delImg = new ImgButton();  
    			delImg.setShowDown(false);  
    			delImg.setShowRollOver(false); 
    			delImg.setSrc(GWT.getHostPageBaseURL() + "images/delete.png");  
    			delImg.setPrompt("Elimina");  
    			delImg.setHeight(25);  
    			delImg.setWidth(25);  
    				
    			recordCanvas.addMember(delImg);
    			return recordCanvas;  
    		}
    		return null;   
    	}  
    };  
    piattiGrid.setShowRecordComponents(true);          
    piattiGrid.setShowRecordComponentsByCell(true); 
    piattiGrid.setWidth(Helper.getScreenWidth() - 360);
    piattiGrid.setHeight(Helper.getContentHeight() - 50);
    piattiGrid.setDataSource(ConfigurazionePiattiDS.getInstance());
    piattiGrid.setFastCellUpdates(true);
    piattiGrid.setDataFetchMode(FetchMode.BASIC);
    piattiGrid.setAutoFetchData(false);
    piattiGrid.setSortField("nome");
    piattiGrid.setSortDirection(SortDirection.ASCENDING);
    piattiGrid.setUseAllDataSourceFields(false);
    piattiGrid.setWrapCells(true);
    piattiGrid.setGroupByField("nome");
    piattiGrid.setShowGroupSummary(true);
    piattiGrid.setShowGroupSummaryInHeader(true);
    piattiGrid.setGroupStartOpen(GroupStartOpen.ALL); 
    
    ResultSet rsProperties = new ResultSet();
    rsProperties.setUseClientSorting(false);
    rsProperties.setUseClientFiltering(false);
    piattiGrid.setDataProperties(rsProperties);
    
    ListGridField nomeField = new ListGridField("nome", "Nome");
    nomeField.setWidth("100%");
    nomeField.setCanFilter(false);
    nomeField.setShowGroupSummary(true);
    nomeField.setShowGridSummary(false);
    
    ListGridField actionField = new ListGridField("action", "Azioni");
    actionField.setCanFilter(false);
    actionField.setAlign(Alignment.CENTER);
    actionField.setWidth(150);
    actionField.setCanEdit(false);
    actionField.setShowGroupSummary(true);
    actionField.setShowGridSummary(false);
    
    piattiGrid.setFields(nomeField, actionField);

    I've smartgwt 4.1p and I've found this problem during development on eclipse, so I've tested this code only in firefox 24.5.0

    Thx for any help...
    Last edited by Zoiderberg; 14 Jun 2014, 05:28.

    #2
    News??

    Is a my incorrect configuration? Can I do it with smartgwt?

    I need icons in group header cause i have some functions related at group record as delete or edit, but i see this icons only if setShowGroupSummary is set to false..

    I'm new with smartgwt so any help would be appreciated
    Thx
    Last edited by Zoiderberg; 14 Jun 2014, 05:29.

    Comment


      #3
      Ok.... I will try to solve this problem alone....Forever alone :(

      Thx for support....

      Comment


        #4
        UP!!!

        I don't found a solution!!

        I've updated my smartgwt lib to 5.0p but I cannot display actions in group header!!

        Someone give me a tip

        Can I display some action in Grid group header or not???

        If I can, How I do it?!?!?

        Please help me.
        Thx

        Comment

        Working...
        X