GridColumn (Column Layout and Auto Width)
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 Overview, Creating 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)的更多相关文章
- ExtJS 布局-Column布局(Column layout)
更新记录: 2022年6月1日 开始. 2022年6月4日 发布. 1.说明 使用列布局,可以将容器拆分为特定大小的列,并将子组件放置在这些列中. 可以设置子组件宽度值为: 百分比(相对父容器宽度) ...
- css var & auto width css triangle
css var & auto width css triangle https://codepen.io/xgqfrms/pen/PooeEbd css var https://codepen ...
- Auto Layout Guide----(二)-----Auto Layout Without Constraints
Auto Layout Without Constraints 没有约束的自动布局 Stack views provide an easy way to leverage the power of A ...
- Extjs4学习
1 Ext js初步 1.1 获取Extjs 下载extjs: 可以从http://extjs.org.cn/ 获得需要的extjs发布包及更多支持. 1.2 搭建学习环境: 假设您的机器已经安装my ...
- Extjs--12种布局方式
按照Extjs的4.1的文档来看,extjs的布局方式大致有12种,下面一一介绍,有些代码就是文档中的. 1.Border 边界布局 border布局,最多可以将页面分割为"东南西北中&qu ...
- extjs_08_界面布局
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYWRhbV93enM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...
- ExtJs布局详解
序言 1.百度百科上说:ExtJs功能丰富,无人能出其右.无论是界面之美,还是功能之强,extjs都高居榜首. 2.呵呵,界面之美当是少不了布局的,这篇文章我写layout的七种布局.(extjs是4 ...
- Blend 2015 教程 (一) 基础
微软公司在Visual Studio 2015产品套件中作出了许多革命性的变更,包括.NET开源,.NET服务器端部分跨平台,推出向个人和小团队免费的社区版,移动应用开发部分跨平台支持,商店应用支持C ...
- Blend 2015 教程 (二) 样式
前一篇讲述了如何在新Blend中完成一个简单的带数据绑定的界面小例子,本篇将讲述一下,把View层和Style层分开,并搭建Style层框架的方法,并进行细节样式修改. 1. 在解决方案资源管理器面板 ...
随机推荐
- 想3分钟搭建图像识别系统?这里有一份TensorFlow速成教程(转)
http://www.voidcn.com/article/p-wyaahqji-dr.html 从我们见到的各种图像识别软件来看,机器似乎能认出人脸.猫.狗.花草.各种汽车等等日常生活中出现的物体, ...
- hdu-1404-博弈+打表
Digital Deletions Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- ASP.NET网页生命周期事件
网页事件 典型的使用方式 PreInit PreInit事件是网页生命周期中非常早起的一个事件,在PreInit事件触发之后,就会加载用户设置信息与网页主题.我们通常使用PreInit事件来执行下列处 ...
- linux磁盘清理记录
执行df -h查看自己的数据磁盘到达97% 使用du -h --max-depth=1 查看数据占用较大的文件 清理记录 1.mysql慢查询日志 # mv slow.log slow.log.ba ...
- Windows环境搭建ElasticSearch 5.*并配置head
前言: ES5*以上版本需要jdk1.8,jdk1.8,jdk1.8.重要的事情说三遍 1.下载ElasticSearch https://www.elastic.co/cn/downloads/el ...
- sgu108. Self-numbers 2 滚动数组 打表 难度:1
108. Self-numbers 2 time limit per test: 0.5 sec. memory limit per test: 4096 KB In 1949 the Indian ...
- 快速切题 hdu2416 Treasure of the Chimp Island 搜索 解题报告
Treasure of the Chimp Island Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K ( ...
- 微信小程序-注册和第一个demo
第一篇 申请帐号 https://mp.weixin.qq.com/cgi-bin/registermidpage?action=index&lang=zh_CN 这里注册帐号,记得选小程序, ...
- js日期选择并将日期返回文本框
date.js // JavaScript Document var gMonths=new Array("一月","二月","三月",&q ...
- 《Python》 基础数据类型补充和深浅copy
一.基础数据类型的补充 元组: 如果元组中只有一个数据,且没有逗号,则该‘元组’数据类型与里面的数据类型一致 列表: 列表之间可加不可减,可跟数字相乘 l1=['wang','rui'] l2=['c ...