private void editingControl_KeyUp(object sender, KeyEventArgs e) { temp_text = (ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxEditingControl)sender; //if (rowindex >= 0 & colindex >= 0) //{ if (string.IsNullOrEmpty(temp_text.Text)) { //temp_text.BackColor = Color.Red; if (dataGridView1.CurrentCell.Style.BackColor != Color.Red) { dataGridView1.CurrentCell.Style.BackColor = Color.Red; } } else { //temp_text.BackColor = Color.Blue; if (dataGridView1.CurrentCell.Style.BackColor != Color.Blue) { dataGridView1.CurrentCell.Style.BackColor = Color.Blue; } } //} }
private void DataGridView1_EditingControlShowing(object sender, System.Windows.Forms.DataGridViewEditingControlShowingEventArgs e) { editigncntrl = (ComponentFactory.Krypton.Toolkit.KryptonDataGridViewTextBoxEditingControl)e.Control; }