Hi Isomorphic,
can you please explain different auto-fitting behaviour when the ListGridField type is set to DATE and to TEXT?
Modified showcase com.smartgwt.sample.showcase.client.grid.datatypes.GridDataTypesDateSample
When independenceField is set to TEXT:
OnDraw:
OnSetData:
When independenceField is set to DATE:
OnDraw:
OnSetData:
What should be the correct way for ListGridField of type DATE to honour width "*"? We want it to behave the same as field of type TEXT.
Thanks
Matus
Tested on:
SmartClient Version: v10.0p_2018-03-14/LGPL Development Only (built 2018-03-14)
GC Version 65.0.3325.162 (Official Build) (64-bit)
can you please explain different auto-fitting behaviour when the ListGridField type is set to DATE and to TEXT?
Modified showcase com.smartgwt.sample.showcase.client.grid.datatypes.GridDataTypesDateSample
Code:
final ListGrid countryGrid = new ListGrid(); countryGrid.setWidth(700); countryGrid.setHeight(224); countryGrid.setShowAllRecords(true); countryGrid.setCanEdit(true); countryGrid.setEditEvent(ListGridEditEvent.CLICK); countryGrid.setModalEditing(true); // AutoFit is set countryGrid.setAutoFitFieldWidths(true); countryGrid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH); ListGridField countryCodeField = new ListGridField("countryCode", "Flag", 50); countryCodeField.setAlign(Alignment.CENTER); countryCodeField.setType(ListGridFieldType.IMAGE); countryCodeField.setImageURLPrefix("flags/16/"); countryCodeField.setImageURLSuffix(".png"); countryCodeField.setCanEdit(false); ListGridField nameField = new ListGridField("countryName", "Country"); nameField.setWidth(50); // We test this field ListGridField independenceField = new ListGridField("independence", "Nationhood"); //independenceField.setType(ListGridFieldType.TEXT); independenceField.setType(ListGridFieldType.DATE); independenceField.setWidth("*"); countryGrid.setFields(new ListGridField[] {countryCodeField, nameField, independenceField}); canvas.addMember(countryGrid); // Problem occurs only when we set data after the grid is drawn! Button button = new Button("Set data"); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { countryGrid.setData(CountrySampleData.getRecords()); } }); canvas.addMember(button);
OnDraw:
OnSetData:
When independenceField is set to DATE:
OnDraw:
OnSetData:
What should be the correct way for ListGridField of type DATE to honour width "*"? We want it to behave the same as field of type TEXT.
Thanks
Matus
Tested on:
SmartClient Version: v10.0p_2018-03-14/LGPL Development Only (built 2018-03-14)
GC Version 65.0.3325.162 (Official Build) (64-bit)
Comment