Skip to content

Solve the tree table row height bug.树表格行高度bug解决。

kwwwvagaa edited this page Sep 10, 2019 · 1 revision

Because the tree table needs to calculate the height of the parent and change it, you need to turn off the automatic calculation of the height. The table control has the property IsCloseAutoHeight, the role of this property is

whether to automatically adjust the maximum height (when true, you need to manually calculate the height, please use with caution)

When the RowType property of the table control is UCDataGridViewTreeRow, IsCloseAutoHeight is automatically changed to True, and you do not need to manually modify it again.

When you customize the tree row control, you need to manually specify IsCloseAutoHeight=true.

因为树表格需要计算父级的高度并改变,所以需要关闭自动计算高度的功能。 表格控件有属性IsCloseAutoHeight,该属性的作用是 “是否关闭自动适应最大高度(当为true时,需要手动计算高度,请慎用)”

当表格控件的RowType属性值为UCDataGridViewTreeRow的时候,IsCloseAutoHeight已自动修改为True了,不需要手动再次修改。

当你自定义了树行控件的时候,你就要需要手动来指定IsCloseAutoHeight=true了