SmartGWT: hide a column in a grouped grid (which makes the group)

前端 未结 4 429
时光说笑
时光说笑 2021-01-28 16:42

I have a SmartGWT grid, where I want to display some data from JBoss-Server and it\'s grouped by one textfield that I fetch from JSON.

So, but I want this textfield o

相关标签:
4条回答
  • 2021-01-28 17:29

    You've already posted here and didn't answer to the people who oriented you toward the setHidden methode of the ListGridField.

    0 讨论(0)
  • 2021-01-28 17:32

    There is simple and clean workaround. Just set width parameter of the filed to '0'. Additionally clear title parameter if you have one (but this is only necessary in some sophisticated ListGrid use cases).

    0 讨论(0)
  • 2021-01-28 17:35

    The clean way is to hide the ListGridField like this:

        ListGridField groupField = new ListGridField(FLD_CATEGORY, "Group");
        groupField.setHidden(true);
    

    Note that if you use a DataSourceField, you may need to declare hard-coded ListGridField definitions

    0 讨论(0)
  • 2021-01-28 17:36

    I've actually had the most success hiding the field using the DataSourceField as opposed to the grid itself.

    DataSource ds = new DataSource() {
        {
            DataSourceTextField field = new DataSourceTextField();
            field.setHidden(true);
    
            addField(field);
        }
    }
    
    0 讨论(0)
提交回复
热议问题