Announcement

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

    How to add icons in the listgrid simplefilter dropdown box.

    Hi Isomorphic,

    Issue:Not able to add icons in the simplefilter dropdown list of listgrid field.
    Explanation:
    1. One of my listgridfield contains only icons.
    2. To apply simplefilter i would like to display "icons" in the simplefilter dropdown list.
    3. Icons should be filtered based on the user selected icon in the simple filer list.

    Please let us know whether smartgwt have this feature support or not. If have please let us how to achieve this.

    Note: Expected behavior screen shot is attached for your reference.
    Attached File NAme: .jpg

    Smart GWT Version: 6.1 pro
    Google chrome version: Version 65.0.3325.162 (Official Build) (64-bit).
    Attached Files

    #2
    Hi vnathank,

    yes, I have this working like this:
    Code:
    import java.util.LinkedHashMap;
    
    import com.smartgwt.client.types.ListGridFieldType;
    import com.smartgwt.client.widgets.grid.ListGridField;
    
    public final class ListGridFieldCostsInQueue extends ListGridField {
    
        public ListGridFieldCostsInQueue(final String name) {
            super(name);
            setType(ListGridFieldType.IMAGE);
            setValueIcons(getCostsInQueueValueMap());
            // See https://forums.smartclient.com/forum/smart-gwt-technical-q-a/249514-5-1p-6-1p-valueicon-problem-with-two-images-created-one-with-wrong-url
            setShowValueIconOnly(true);
            setExportRawValues(true);
            setWidth(50);
            setCanDragResize(false);
            setFilterEditorProperties(new SelectItemYesNo());
            setCanFilter(true);
        }
    
        private static LinkedHashMap<String, String> getCostsInQueueValueMap() {
            LinkedHashMap<String, String> vM = new LinkedHashMap<String, String>();
            vM.put("Y", ".....times.svg");
            vM.put("N", "");
            return vM;
        }
    }
    Best regards
    Blama

    Comment


      #3
      Dear Blama,

      Thank you for your reply.
      Actually my case is different. I am able to add\display icons as a value in the listgridfield . Here no issues. But i would like to add\display dropdown list with icons on the "listgridfiled" when i enable "Simple Filter" on the list grid.

      Please let us know if any solution is available. Thank you.

      Comment


        #4
        That is exactly what Blama showed you how to do - his screenshot shows icons in the dropdown. Please revisit.

        Comment

        Working...
        X