Derived Cell Control Tutorial provides step-by-step instructions to derive cell controls and customize cell behavior. In this tutorial, we have created a LinkLabel cell.
In general, a cell type requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell, such as drawing and handling mouse actions.
For our LinkLabel sample, we have derived both the model class and the renderer class from the GridStaticCellModel and GridStaticCellRenderer classes of Essential Grid.
Features
public override GridCellRendererBase CreateRenderer(GridControlBase control) { return new LinkLabelCellRenderer(control, this); }
System.Diagnostics.Process process = new System.Diagnostics.Process(); process.StartInfo.FileName = EXEname; process.StartInfo.Arguments = (string) style.Tag; process.Start();
gridControl1.CellModels.Add("LinkLabelCell", new LinkLabelCellModel(gridControl1.Model));
gridControl1[rowIndex, 2].CellType = "LinkLabelCell"; gridControl1[rowIndex, 2].Text = "Syncfusion, Inc."; gridControl1[rowIndex, 2].Tag = "http://www.syncfusion.com";
Interactive Features