Change Theme Settings
Change Theme Settings
Themes
 
Metropolis
Moderno
iOS
Material
Material Compact
Office 365
Mulberry
Show All Themes
v
...v

CellValueChanged Event

 


The DevExpress ASP.NET Spreadsheet enables you to execute custom server code in response to a sheet cell value change. For this purpose, the Spreadsheet provides the CellValueChanged event.

The CellValueChanged event fires on the server side after a cell's content has been changed as a result of end-user interaction. This event is raised for all documents opened within all Spreadsheet instances in a web application. So, to handle the CellValueChanged event, you need to use a static event handler function, which can be accessed globally. It is recommended to subscribe to the Spreadsheet's CellValueChanged event in the Global.asax file's Application_Start method as the following demo code illustrates.

void Application_Start(object sender, EventArgs e) {
    ...
    ASPxSpreadsheet.CellValueChanged += SpreadsheetGlobalHandlers.OnCellValueChanged;
    ...
}

To identify a document for which the CellValueChanged event is raised, use the event's sender parameter. The type of this parameter (SpreadsheetDocumentInfo) provides the DocumentId property that uniquely identifies the processed document.

In this demo, the CellValueChanged event is handled to respond to entering a shipment tracking number into the C3 data cell and to obtain shipment details from a server data source (which might contain large data in a real application).