$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
DataGridView WinForms Control
Create custom data grid cells to GirdView in C# for your .NET Windows Forms applications
Home > WinForms UI Controls > User Manual > Grid Editors Customizing in C#

GridView Editor Behavior Customizing

The Kettic DataGridView Control allows data entry, data editing, and data validation by using the data editors included in the Data Grid class. The data editor is able to edit data in each specific column type. There are various types of editors, including, KetticTextBoxEditor, KetticMaskedEditBoxEditor, KetticGridSpinEditor, KetticCheckBoxEditor, KetticDateTimeEditor, KetticComboBoxEditor, and KetticMultipleColumnBomboBoxElement.

Edit Grid Data Cells in C#.NET

To edit the cells in grid, we can switch the DataGridView Control from read only mode to edit mode. Then we can edit the cells in grid by beginning with entering content or pressing F2. However, the following conditions should be available while editing cells in grid.
  • Enable the Kettic Data Grid control
  • Editing mode should be supported by the underlying data source
  • Set the property StartEditMode to Auto, instead of the mode editing in C# code
  • Set the ReadOnly property of cell, column, and control to false and enable the edit mode
  • Set the value of the property, GridTemplate.ApplyEditRow, to true

GridView Editor Behavior Customizing in C#.NET

The Kettic DataGridView provides the support of customizing the look and behavior of GridView editors in C# Windows Forms template projects. The GridView offers the events, StartEditCell and InitializedCellEditor, to achieve the grid data cell customizing. The following are the detailed explanation of the two events.
  • StartEditCell, this event will be fired as long as the grid editor is created
  • InitializedCellEditor, this event will be fired while creating the grid cell editor and initializing it with a predefined set of properties.
The C# code below shows how to customize the spin editor to GridView control by changing the default border of the GridSpinEditor property.


void ketticGridView1_StartEditCell (object sender, Kettic.WinForms.UI.GridViewCellCancelEventArgs e)
{
GridSpinEditor editor = this.ketticGridView1.ActiveEditor as GridSpinEditor;
if (editor != null)
{
((BorderPrimitive)editor.EditorElement.Children[1]).ForeColor = Color.Black;

}
}

UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls