Cell value transformation


This example demonstrates use of the OnCellTransform event which can be used to perform client-side transformation of cell content via a JavaScript method. The event handler is called for every cell in the grid passing a reference to the cell and the name of the column to which it relates. It also makes use of the OnInitialized event to save a reference to the client-side control which can be used to reload the grid after the text formatting style is changed.

Text formatting style

DbNetGridCore employeesGrid = new DbNetGridCore("northwind", "employees")
	Columns = new List() { "FirstName", "LastName", "Title", "Notes" }
employeesGrid.Bind(EventType.OnInitialized, "saveGridReference");
employeesGrid.Bind(EventType.OnCellTransform, "transformNotes");