[英]How do I make a DevExpress GridControl column fill remaining space in the grid?
I have a GridControl
where the first column is "Name", whose width I need to be variable, followed by several other columns whose width remains constant. 我有一个GridControl
,其中第一列是“名称”,其宽度我需要可变,其后是其他几列,其宽度保持不变。 If I was using the Telerik DataGridView
, I would set the column width to *
, but the DevExpress control doesn't allow that for the column width. 如果使用Telerik DataGridView
,我会将列宽设置为*
,但是DevExpress控件不允许将列宽设置为*
。 It has no converter. 它没有转换器。
When the grid expands or contracts horizontally, I need the "Name" column to do the same, proportionately. 当网格水平扩展或收缩时,我需要“名称”列按比例执行此操作。 Do I have to do this in code-behind? 我必须在代码隐藏中执行此操作吗? I really like my WPF basic CRUD to use as little code as possible. 我真的很喜欢WPF基本CRUD使用尽可能少的代码。
How do I achieve this? 我该如何实现?
I haven't used DevExpress for a while, but I think you can use for your 'Name' Column GridColumn.BestFit 我已经有一段时间没有使用DevExpress了,但我认为您可以将“名称”列使用GridColumn.BestFit
For the rest, you can use FixedWidth 对于其余的,您可以使用FixedWidth
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.