简体   繁体   中英

How to make a devexpress table row autosize?

I use a devexpress LayoutControl. the LayoutControlGroup.LayoutMode is Table. I have two rows. And I set the Size Type to autosize. In each row i have a panel with a dynamic height. the panels have dockstyle fill. But when I run the row proportions are always like in the designer. And not at all autosizing. What am i missing? Can anyone please help??!?

Dock and AutoSize properties are opposite as you thinking. If your control parent has dock property set to true then you can dock child to the parent control but If parent control is going to be resize according to the content( means child controls) then you have to set size of the child controls.

Let your panels in the row has dynamic with then handle ReSize event of panels and set size of the panel according to the width of the controls then the AutoSize property work well on the rows otherwise it is hard to get desired layout with the current settings.

Refer these for more information:

AutoSize Behavior in the TableLayoutPanel Control
In TableLayoutPanel if Dock = Fill and AutoSize = true then last column/row occupy all remaining space
TableLayoutPanel sizing

Hope this help..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM