dev GridView常用属性,事件
一、属性
1、GridControl属性
//允许拖拽行 gridControl1.AllowDrop = true;
2、GridView属性
//不可编辑 gridView1.OptionsBehavior.Editable = false; //只读 gridView1.OptionsBehavior.ReadOnly = false; //可选择多行,使用Ctrl,Shift键等 gridView1.OptionsSelection.MultiSelect = true; //允许单元格合并,当值相同时,则自动合并 gridView1.OptionsView.AllowCellMerge = true; //列头自适应宽度 gridView1.OptionsView.ColumnAutoWidth = true; //是否显示列头 gridView1.OptionsView.ShowColumnHeaders = true; //是否显示脚 gridView1.OptionsView.ShowFooter = true; //是否显示分组面板 gridView1.OptionsView.ShowGroupPanel = true; //是否显示行号、指针 gridView1.OptionsView.ShowIndicator = true;
3、GridColumn列属性
//列头可筛选 gridView1.OptionsCustomization.AllowFilter = true; //可按列分组 gridView1.OptionsCustomization.AllowGroup = true; //列头可排序 gridView1.OptionsCustomization.AllowSort = true; //列头可移动顺序,拖动 gridView1.OptionsCustomization.AllowColumnMoving = true ; //列宽度调整,拖动宽度 gridView1.OptionsCustomization.AllowColumnResizing = false ;
备注:不断完善中