The Perfect Day

分享技术,编写未来

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
        {
            DataGridView dgv 
= (DataGridView)sender;
            
if (e.Control is DataGridViewTextBoxEditingControl)
            {
                DataGridViewTextBoxEditingControl editControl 
= (DataGridViewTextBoxEditingControl)e.Control;
                
if (dgv.CurrentCell.OwningColumn.Name == "Column1")
                {
                    editControl.CharacterCasing 
= CharacterCasing.Upper;
                }
                
else
                {
                    editControl.CharacterCasing 
= CharacterCasing.Normal;
                }
            }
        }
posted on 2008-05-26 14:52  StephenJu  阅读(661)  评论(0编辑  收藏  举报