Syncfusion.Grid.Windows
Example 


Syncfusion.Windows.Forms.Grid Namespace > GridControlBase Class : CurrentCellInitializeControlText Event

CurrentCellInitializeControlText Event

The CurrentCellInitializeControlText notifies you that the current cell is initialized with text to be displayed in the associated control, e.g. a text box control.
Syntax
'Declaration
 
<DescriptionAttribute("Occurs when the current cell is initialized with text to be displayed in the associated control.")>
<CategoryAttribute("Behavior")>
Public Event CurrentCellInitializeControlText As GridCurrentCellInitializeControlTextEventHandler
'Usage
 
Dim instance As GridControlBase
Dim handler As GridCurrentCellInitializeControlTextEventHandler
 
AddHandler instance.CurrentCellInitializeControlText, handler
[Description("Occurs when the current cell is initialized with text to be displayed in the associated control.")]
[Category("Behavior")]
public event GridCurrentCellInitializeControlTextEventHandler CurrentCellInitializeControlText
Event Data

The event handler receives an argument of type GridCurrentCellInitializeControlTextEventArgs containing data related to this event. The following GridCurrentCellInitializeControlTextEventArgs properties provide information specific to this event.

PropertyDescription
(Inherited from System.ComponentModel.CancelEventArgs)
Gets the cell value that is assigned to the cell renderer.  
Gets the column index.  
Gets or sets the text that should be displayed in the active cell.  
Gets the row index.  
Gets Style information.  
Example
public Form1()
{
    InitializeComponent();
            
    this.gridDataBoundGrid2.CurrentCellInitializeControlText += new GridCurrentCellInitializeControlTextEventHandler(gridDataBoundGrid2_CurrentCellInitializeControlText);
    this.sqlDataAdapter1.Fill(this.dataSet11);
}
            
void gridDataBoundGrid2_CurrentCellInitializeControlText(object sender, GridCurrentCellInitializeControlTextEventArgs e)
{
    if (e.CellValue != null)
    {
        e.ControlText = e.CellValue.ToString();
    }
}
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.14

See Also