예제 #1
0
 private void gridControl_ProcessGridKey(object sender, KeyEventArgs e)
 {
     if (gridView.IsGroupRow(gridView.FocusedRowHandle))
     {
         return;
     }
     ProcessKey(e);
     if ((e.KeyValue >= 65 && e.KeyValue <= 90) ||
         (e.KeyValue >= 48 && e.KeyValue <= 57))
     {
         this.Text          += Convert.ToChar(e.KeyValue).ToString().ToLower();
         this.SelectionStart = this.Text.Length;
         e.Handled           = true;
     }
     else if (e.KeyCode == Keys.Back)
     {
         int textLen = this.Text.Length;
         if (textLen > 0)
         {
             this.Text           = this.Text.Substring(0, textLen - 1);
             this.SelectionStart = textLen;
         }
         e.Handled = true;
     }
 }