DataGridNoActiveCellColumn.cs
上传用户:ksd66jhda
上传日期:2013-04-03
资源大小:234k
文件大小:1k
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- namespace 进销存管理系统
- {
- /// <summary>
- /// Class1 的摘要说明。
- /// </summary>
- internal class DataGridNoActiveCellColumn : System.Windows.Forms.DataGridTextBoxColumn
- {
- //重载DataGridTextBoxColumn类的Edit方法,以便使点击DataGrid中任一单元格都选中当前行
- protected override void Edit(CurrencyManager source, int rowNum, Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible)
- {
- int SelectedRow = rowNum;
- this.DataGridTableStyle.DataGrid.Select(SelectedRow);
- }
- }
- }