Wisej.NET Examples
HomeSupportDocumentation
  • Introduction
  • Tutorials
    • StockViewer
      • Structure
      • User Interface
      • Animations
      • Localization
      • Code
  • Examples
    • AspNetAuthentication
    • BackgroundTasks
    • Buttons
    • ChartJS
    • CodeProject
    • CustomCellRenderer
    • CustomPainting
    • DataBinding
    • DataRepeaterDragDrop
    • DeepLinking
    • Download
    • EditorsChoice
    • FullCalendar
    • GoogleMaps
    • KeyboardHandling
    • LazyLoadingPanel
    • Localization
    • MDIExample
    • ModalWorkflow
    • NavigationBar
    • Pannellum
    • ProgressCircle
    • Responsive
    • RibbonBar
    • SimpleChat
    • SlideBar
    • SmoothieChart
    • TagInput
    • TourPanel
    • TreeGrid
    • UploadFiles
    • UserControl
    • UserDesktop
    • UserPaintCells
  • Premium
    • Syncfusion EJ2 DocumentEditor
    • Syncfusion EJ2 FileManager
    • Syncfusion EJ2 PdfViewer
    • KendoUI Captcha
    • KendoUI TaskBoard
Powered by GitBook
On this page
  • Sample Code
  • Downloads

Was this helpful?

Export as PDF
  1. Examples

CustomCellRenderer

PreviousCodeProjectNextCustomPainting

Last updated 1 year ago

Was this helpful?

This samples shows how to add a custom renderer / editor to a DataGridView cell.

Sample Code

qx.Class.define("my.JSONCellRenderer", {

	extend: wisej.web.datagrid.cellRenderer.Cell,

	members: {

		/**
		 * Returns the value to render inside the cell.
		 *
		 * This method may be overridden by sub classes.
		 *
		 * @param cellInfo {Map} The information about the cell.
		 *          See {@link qx.ui.table.cellrenderer.Abstract#createDataCellHtml}.
		 */
		_getCellValue: function (cellInfo) {

			var jsonObj = JSON.parse(cellInfo.value);

			return "<b>" + jsonObj.Value1 + "</b><br/>" + jsonObj.Value2 + "<br/>" + jsonObj.Value3;
		}
	}

});
public class DataGridViewJSONColumn : DataGridViewTextBoxColumn
    {
        public DataGridViewJSONColumn()
        {
            this.Editor = new DataGridViewJSONColumnEditor();
        }

        public override string CellRenderer
        {
            get { return "my.JSONCellRenderer"; }
            set { }
        }
    }     

Downloads

Download Sample in C#
Download Sample in VB.NET