Namespace:DevExpress.XtraGrid.Columns
Assembly:DevExpress.XtraGrid.v16.2.dll

https://documentation.devexpress.com/#WindowsForms/clsDevExpressXtraGridColumnsGridColumntopic

Represents an individual column in Grid Views and Card Views.

Remarks

GridColumn objects represent columns and card fields in Grid Views and Card Views respectively. Such objects are used to display data from an individual data field. The bound data field is specified by the FieldName property. Settings provided by the GridColumn class also allow you to control how column data is displayed and edited, column header contents, the column's position and visibility, etc.

Note that some of the settings provided are in effect only for columns displayed in Grid Views.

For instance, the GroupIndex and SummaryItem properties are in effect for Grid View columns only, as Card Views do not support the grouping and summary features.

You can access a View's column collection using the ColumnView.Columns property. This property returns an object whose indexer can be used to access individual GridColumn objects. Note also that column objects are Component descendants. This enables you to access columns in code directly by their names.

You don't need to create column objects manually using the GridColumn class constructor. Columns can be created using methods of the owning column collection (GridColumnCollection class) or by using the ColumnView.PopulateColumns method of the required View.

For additional information regarding columns, refer to the Column and Card Field OverviewCreating Columns and Binding Them to Data Fields and Accessing and Identifying Columns topics.

ColumnLayout

列长自适应

https://documentation.devexpress.com/#WindowsForms/CustomDocument649

设置GridView的OptionsView的ColumnAutoWidth属性为True

FixedStyle枚举类型

https://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridColumnsFixedStyleEnumtopic

Left The band or column is anchored to the View's left edge.

None The band or column takes part in horizontal scrolling.

Right The band or column is anchored to the View's right edge.

用来固定某一列的位置,上面的链接里有相关说明

Best Fit

Grid Views allow you to apply the best fit feature to an individual column and to all columns at once. When the feature is applied to a column, column width is changed to fit its content (subject to the minimum width restriction). By default, all column values are processed and column width is set to the maximum width required by any cell. For performance reasons, you can limit the number of records taken into account when applying the best fit feature by setting the View's GridOptionsView.BestFitMaxRowCount property. By default, this property value is -1 to indicate that all data rows will be processed. If set to a positive integer, the View processes the specified number of data rows starting from the top visible row.

End-users can apply best fit to a column or to all columns at once using the column header panel's popup menu. Please refer to the Popup Menus Overview topic for details. You can also apply the feature in code using the View's GridView.BestFitColumns method or a column's GridColumn.BestFit method.

Applying best fit with auto width enabled requires special attention. As stated above, the total width of columns always equals the View's width. Thus, applying best fit may not display complete cell contents if the View is not wide enough. On the other hand, columns may be wider than their contents require. A columns' required size is calculated and proportionally applied, so that the total width is the View's width. The image below illustrates an example.

FixedWidth

You can force a column to have a fixed width. Enable a column's OptionsColumn.FixedWidth option for this purpose.

If the option is enabled, a column's width is not affected by the auto width and best fit features.

End-users can resize columns regardless of this option setting.

To prohibit column resizing, use the column's OptionsColumn.AllowSize option.

https://documentation.devexpress.com/#WindowsForms/CustomDocument114719

https://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridColumnsGridColumn_Fixedtopic

设置GridView的OptionsView的ColumnAutoWidth属性为False

设置GridColumn的Fixed属性为Left,设置Width为固定值

GridColumn (Column Layout and Auto Width)的更多相关文章

  1. ExtJS 布局-Column布局(Column layout)

    更新记录: 2022年6月1日 开始. 2022年6月4日 发布. 1.说明 使用列布局,可以将容器拆分为特定大小的列,并将子组件放置在这些列中. 可以设置子组件宽度值为: 百分比(相对父容器宽度) ...

  2. css var & auto width css triangle

    css var & auto width css triangle https://codepen.io/xgqfrms/pen/PooeEbd css var https://codepen ...

  3. Auto Layout Guide----(二)-----Auto Layout Without Constraints

    Auto Layout Without Constraints 没有约束的自动布局 Stack views provide an easy way to leverage the power of A ...

  4. Extjs4学习

    1 Ext js初步 1.1 获取Extjs 下载extjs: 可以从http://extjs.org.cn/ 获得需要的extjs发布包及更多支持. 1.2 搭建学习环境: 假设您的机器已经安装my ...

  5. Extjs--12种布局方式

    按照Extjs的4.1的文档来看,extjs的布局方式大致有12种,下面一一介绍,有些代码就是文档中的. 1.Border 边界布局 border布局,最多可以将页面分割为"东南西北中&qu ...

  6. extjs_08_界面布局

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYWRhbV93enM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  7. ExtJs布局详解

    序言 1.百度百科上说:ExtJs功能丰富,无人能出其右.无论是界面之美,还是功能之强,extjs都高居榜首. 2.呵呵,界面之美当是少不了布局的,这篇文章我写layout的七种布局.(extjs是4 ...

  8. Blend 2015 教程 (一) 基础

    微软公司在Visual Studio 2015产品套件中作出了许多革命性的变更,包括.NET开源,.NET服务器端部分跨平台,推出向个人和小团队免费的社区版,移动应用开发部分跨平台支持,商店应用支持C ...

  9. Blend 2015 教程 (二) 样式

    前一篇讲述了如何在新Blend中完成一个简单的带数据绑定的界面小例子,本篇将讲述一下,把View层和Style层分开,并搭建Style层框架的方法,并进行细节样式修改. 1. 在解决方案资源管理器面板 ...

随机推荐

  1. MySql 定时完成备份

    <?php /*定时备份数据库文件*/ //设置时区 date_default_timezone_set('PRC'); //创建目录 $dirname = 'e:/mysql_dump/'.d ...

  2. 『PyTorch』第一弹_静动态图构建if逻辑对比

    对比TensorFlow和Pytorch的动静态图构建上的差异 静态图框架设计好了不能够修改,且定义静态图时需要使用新的特殊语法,这也意味着图设定时无法使用if.while.for-loop等结构,而 ...

  3. Matlab scatter 如何显示不同颜色点状

    有时候需要在matlab scatter绘图中显示不同颜色区分,如下图是人体血压高压.低压与年龄关系的散点图. 红色点表示高压 绿色点表示低压 用 matlab 如何实现呢? 1.创建一维矩阵x,y1 ...

  4. python-day17--迭代器

    1.迭代: 迭代就是一个一个一个挨着的取值 2.可迭代类型:  str ,列表,元组,集合,字典 3.判断迭代器和可迭代的方法 #第一种:判断内部是不是实现了 __next__#'__next__' ...

  5. html选择器

    1.标签选择器:针对的是元素. <html><head><style type="text/css">p{font:"宋体" ...

  6. c++中的new和delete

    对于计算机程序设计而言,变量和对象在内存中的分配都是编译器在编译程序时安排好的,这带来了极大的不便,如数组必须大开小用,指针必须指向一个已经存在的变量或对象.对于不能确定需要占用多少内存的情况,动态内 ...

  7. n转m进制标准写法(必须记忆)

    #include <bits/stdc++.h> using namespace std; int main() { int n,m; cin >> n >> m; ...

  8. EBS存储附件信息

    附件三种形式 1.文件 2.url 3.文本 三种方式存储不一样 1.文件是存blob 2.url是存一个链接信息,读出来的时候,就是一个蓝色可点链接    fnd_attached_document ...

  9. 标签传播算法(Label Propagation)及Python实现

    众所周知,机器学习可以大体分为三大类:监督学习.非监督学习和半监督学习.监督学习可以认为是我们有非常多的labeled标注数据来train一个模型,期待这个模型能学习到数据的分布,以期对未来没有见到的 ...

  10. Mysql Innodb 表碎片整理

    一.为什么会产生碎片 简单的说,删除数据必然会在数据文件中造成不连续的空白空间,而当插入数据时,这些空白空间则会被利用起来.于是造成了数据的存储位置不连续,以及物理存储顺序与理论上的排序顺序不同,这种 ...