简体   繁体   English

如何使DevExpress GridControl列填充网格中的剩余空间?

[英]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.

相关问题 如何在DevExpress GridControl中填充最后一列的宽度? - How to fill width of last column at DevExpress GridControl? 在UWP / XAML中,如何使SplitView.Content填充窗口中的剩余空间? - In UWP/XAML How do I make the SplitView.Content fill the remaining space in a window? 如何用字符串和日期字段填充DevExpress GridControl? - How to fill a DevExpress GridControl with string and date fields? 如何使用 DevExpress DashboardDesigner.SelectedDataSource 填充 GridControl/DataGridView - How to use DevExpress DashboardDesigner.SelectedDataSource to fill the GridControl/DataGridView 本机类型绑定源/如何使用字符串列表填充 DevExpress GridControl? - Native type binding source / How to fill a DevExpress GridControl with a List of strings? C#DevExpress GridControl:如何根据特定的列文本进行搜索 - C# DevExpress GridControl : how to make search according to specific column text 如何将devexpress defaultLookAndFeel组件放入devexpress网格控件中? - How can I put a devexpress defaultLookAndFeel Component inside of a devexpress gridcontrol? 让文本框填充网格中的剩余空间 - Let TextBox fill remaining Space in Grid 如何使devexpress gridcontrol的指示器将文本显示为粗体 - How to make devexpress gridcontrol's indicator display text bold 如何在devexpress wpf中为gridcontrol的列标题定义工具提示 - How to define tooltip for column header of gridcontrol in devexpress wpf
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM