Dxexpress 的GridControl控件中一次选择一行并且不显示单元格焦点的设置

折腾了好久,总是发现在gridView中一选择的话,选择一行是没有问题,但被点中的单元格却失去了高亮度显示的特征,此时发现行标记那里有一个指示可以编辑的符号,测试了一下,但把此可编辑符号搞掉以后,就能实现一次选择完整的一行.

一般这样设置就可以了.

None.gif   private   void  InitializeComponent()
ExpandedBlockStart.gifContractedBlock.gif        
dot.gif {
InBlock.gif            
this.components = new System.ComponentModel.Container();
InBlock.gif            
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
InBlock.gif            
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
InBlock.gif            
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
InBlock.gif            ((System.ComponentModel.ISupportInitialize)(
this.bindingSource1)).BeginInit();
InBlock.gif            ((System.ComponentModel.ISupportInitialize)(
this.gridControl1)).BeginInit();
InBlock.gif            ((System.ComponentModel.ISupportInitialize)(
this.gridView1)).BeginInit();
InBlock.gif            
this.SuspendLayout();
InBlock.gif            
// 
InBlock.gif            
// bindingSource1
InBlock.gif            
// 
InBlock.gif
            this.bindingSource1.CurrentChanged += new System.EventHandler(this.bindingSource1_CurrentChanged_1);
InBlock.gif            
// 
InBlock.gif            
// gridControl1
InBlock.gif            
// 
InBlock.gif
            this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
InBlock.gif            
// 
InBlock.gif            
// 
InBlock.gif            
// 
InBlock.gif
            this.gridControl1.EmbeddedNavigator.Name = "";
InBlock.gif            
this.gridControl1.Location = new System.Drawing.Point(00);
InBlock.gif            
this.gridControl1.MainView = this.gridView1;
InBlock.gif            
this.gridControl1.Name = "gridControl1";
InBlock.gif            
this.gridControl1.Size = new System.Drawing.Size(654526);
InBlock.gif            
this.gridControl1.TabIndex = 0;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] dot.gif{
ExpandedSubBlockEnd.gif            
this.gridView1}
);
InBlock.gif            
// 
InBlock.gif            
// gridView1
InBlock.gif            
// 
InBlock.gif           
InBlock.gif            
// 
InBlock.gif
            this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
InBlock.gif            
this.gridView1.GridControl = this.gridControl1;
InBlock.gif            
this.gridView1.Name = "gridView1";
InBlock.gif            
this.gridView1.OptionsBehavior.Editable = false;
InBlock.gif            
this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
InBlock.gif            
InBlock.gif            
// 
InBlock.gif
InBlock.gif            
// 
InBlock.gif            
// Form1
InBlock.gif            
// 
InBlock.gif
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
InBlock.gif            
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
InBlock.gif            
this.ClientSize = new System.Drawing.Size(654526);
InBlock.gif            
this.Controls.Add(this.gridControl1);
InBlock.gif            
this.Name = "Form1";
InBlock.gif            
this.Text = "Form1";
InBlock.gif            
this.Load += new System.EventHandler(this.Form1_Load);
InBlock.gif            ((System.ComponentModel.ISupportInitialize)(
this.bindingSource1)).EndInit();
InBlock.gif            ((System.ComponentModel.ISupportInitialize)(
this.gridControl1)).EndInit();
InBlock.gif            ((System.ComponentModel.ISupportInitialize)(
this.gridView1)).EndInit();
InBlock.gif            
this.ResumeLayout(false);
InBlock.gif
ExpandedBlockEnd.gif        }



 


    

转载于:https://www.cnblogs.com/CShapWinForms/archive/2006/05/03/390882.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值