THEMES
THEME SETTINGS

Spreadsheet - API 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).

Version: v2017 vol 1.3
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.