Announcement

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

    possible bug: RecordComponent is not rendered for new Records

    Hello,

    I currently evaluating the 3.1d enterprise edition (2012/10/11) and got the following problem:

    If a ListGrid contains a ListGridField which renders RecordComponents, this RecordComponent is not drawn for new records.

    Here is a short example to reproduce the behaviour:

    Code:
    	public void onModuleLoad() {
    		final ListGrid lg = new ListGrid(){
    			@Override
    			protected Canvas createRecordComponent(ListGridRecord record, Integer colNum) {
    				if (colNum == 1){
    					ImgButton btn = new ImgButton();
    					btn.setHeight(16);
    					btn.setWidth(16);
    					return btn;
    				}
    				return null;
    			}
    		};
    
    		ListGridField f1 = new ListGridField("f1");
    		ListGridField f2 = new ListGridField("actions");
    		f2.setCanEdit(false);
    
    		lg.setFields(f1, f2);
    		lg.setShowRecordComponents(true);
    		lg.setShowRecordComponentsByCell(true);
    
    		lg.setCanEdit(true);
    		lg.addData(new Record());
    		lg.startEditingNew();
    		lg.draw();
    	}

    #2
    This is a know limitation of unsaved records - as we've mentioned they to do not support all the behaviors of normal records.

    Comment


      #3
      Is there any oter way I can display Canvas (like an ImageButton) in a newly created Record? I need to display a Button in every row, also in the unsaved ones.

      Comment

      Working...
      X