空时弹性数据网格可见性

时间:2021-05-20 19:40:37

I have data grid that measures the height according to the rows it has, but i need to disappear/ make invisible when i have no data, so the header will not just appear alone.

我有数据网格根据它有的行来测量高度,但是当我没有数据时我需要消失/不可见,所以标题不会单独出现。

1 个解决方案

#1


1  

Check your dataProvider each time it's updated. If after update it's empty, then set your DataGrid visible (and in case of need includeInLayout) property to false. Set it back to true when on update dataProvider has soma data again.

每次更新时检查您的dataProvider。如果更新后它为空,则将DataGrid设置为可见(并且在需要includeInLayout的情况下)为false。在更新时,将其设置为true,dataProvider再次具有soma数据。

#1


1  

Check your dataProvider each time it's updated. If after update it's empty, then set your DataGrid visible (and in case of need includeInLayout) property to false. Set it back to true when on update dataProvider has soma data again.

每次更新时检查您的dataProvider。如果更新后它为空,则将DataGrid设置为可见(并且在需要includeInLayout的情况下)为false。在更新时,将其设置为true,dataProvider再次具有soma数据。