Announcement

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

    Picklist-width of SelectItem

    Hi Isomorphic,

    I'm using a ListGrid with several Fields, those fields have depending on there purpose different FilterProperties.

    One I'm using is as following:

    Code:
    public class SelectItemFilterEditorUser extends SelectItemFilterEditor {
    
        public SelectItemFilterEditorUser(FilterEnum filterOperator, boolean multiple, String sortField, ListGridField... [B]pickListFields[/B]) {
            super(DatasourceEnum.T_USER.getValue(), multiple, filterOperator.getFilterType(), FetchMode.LOCAL);
            setPickListFields(pickListFields);
            ListGrid lg = new ListGrid();
            lg.setCanDragResize(true);
            setPickListProperties(lg);
            if (sortField != null)
                setSortField(sortField);
            setValueField(filterDS.getPrimaryKeyFieldName());
            setForeignDisplayField(DatasourceFieldEnum.T_USER__SURNAME.getValue());
            setOptionOperationId(OperationIdEnum.T_USER__FETCHOTHERLEFILTER.getValue());
            setAllowEmptyValue(true);
        }
    }
    As pickListFields i have 3 fields [Surname, Name, Company] but those are only to give more information. My problem is, that the pickListGrid of this SelectItem doesn't fit the fields so that i have to scroll horizontally to see the whole row. Please see the following screenshot:

    Click image for larger version

Name:	screenshot.png
Views:	116
Size:	47.2 KB
ID:	261324



    I tried different approaches so far, like e.g:


    Code:
            ListGrid lg = new ListGrid();
            lg.setAutoFitFieldWidths(true);
            setPickListProperties(lg);
    
      lg. setCanAutoFitFields(true);
    
       lg. setAutoFitFieldWidths(true);
    
        lg.setWidth100();


    and everything else that sounded like it could do the job, but without success. Could You please help me here and tell me how to fit all fields without horizontal scrolling?

    Thanks in Advance,
    Kind Regards

    #2
    Use pickListWidth. It's a setting on SelectItem.

    Note there is also a pickListMaxWidth which may have stopped your autofit setting from making the grid as wide as you wanted.

    Comment

    Working...
    X