My SmartGWT ListGrid have some fields, wich contain long string. I set property "countryGrid.setCanResizeFields(true)"
.
When I change the width of the field, I want to see something like this: |A very long dat...|
Data that does not fit, will be replaced by Dots. But instead, my string data simply cutted, like this |A very long dat|
What property is responsible?
Here is my code:
//deptartment Tab
deptGrid.setWidth100();
deptGrid.setHeight(300);
deptGrid.setTop(50);
deptGrid.setAlternateRecordStyles(true);
deptGrid.setShowAllRecords(true);
deptGrid.setCanRemoveRecords(true);
deptGrid.setCanEdit(true);
ListGridField emplIdField_DepTab = new ListGridField("id", "ID", 40);
ListGridField nameField_DepTab = new ListGridField("name", "NAM", 200);
ListGridField deptIdField_DepTab = new ListGridField("deptId", "DEPARTMENT");
ListGridField buildingIdField_DepTab = new ListGridField("buildingId", "BUILDING");
deptGrid.setFields(new ListGridField[] {
emplIdField_DepTab, nameField_DepTab, deptIdField_DepTab, buildingIdField_DepTab
});
deptGrid.setCanResizeFields(false);
deptGrid.setShowAllRecords(true);
deptGrid.setShowRecordComponentsByCell(true);
deptGrid.setFixedRecordHeights(true);
deptGrid.setAutoFetchData(true);
deptGrid.setAutoFitMaxRecords(3);
deptGrid.setAutoFitData(Autofit.VERTICAL);
deptGrid.setShowFilterEditor(true);
deptGrid.setCanEdit(true);
You don't need to write any code for this functionality. This is the by default behavior of the
ListGrid
.Please have a look at Smart GWT Showcase with live sample code for more clarity.
EDIT
The issue may be caused by using older version of Smart GWT. Try it again with latest nightly build of Smart GWT.