GWT Datagrid does not show data , but contains it

前端 未结 3 1062
刺人心
刺人心 2020-12-09 05:29

I\'m trying to convert a cellTable into adatagrid, because I want to add a search handler later and therefor I need fixed column headers. At the mo

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-09 06:10

    Here are my 2 cents.

    When it comes to render a DataGrid outside of a properly formed "LayoutPanel or Panel that implements the ProvidesResize" tree structure, I found out I always need to keep the following in mind:

    1. As this question explains, the height DataGrid property needs an explicit value, for example, "123px". Without this, DataGrid does not show its data rows (even if they are in the DOM).

    2. If put a DataGrid inside an unfocused DecoratedTabPanel tab, DataGrid.redraw() needs to be called when such tab gets focus . Again, without this, DataGrid does not show its data rows (even if they are in the DOM).

    I hope this helps.

提交回复
热议问题