• All Demos
  • Grid SDK
  • Chart SDK
  • Scheduler SDK
  • Gantt SDK
  • Rich Text Editor SDK
  • Diagram SDK
  • File Manager SDK
  • Document SDK
  • PDF Viewer SDK
  • DOCX Editor SDK
  • Spreadsheet Editor SDK
  • Material 3
  • Bootstrap 5
  • Fluent 2
  • Tailwind CSS
  • Fluent 2 High Contrast
Preferences
Mode Selection
Touch
Mouse
Theme Selection
Theme Mode
Localization
*Translated by Google Translator.
Currency

Example of Formula Cell Feature in ASP.NET Core Data Grid Control

This sample demonstrates the Formula Cell feature in the Data Grid, which brings spreadsheet-like calculations directly into grid cells. It enables formulas to be dynamically defined and evaluated based on the values of other cells within the same row.

DEMO
SOURCE

In this demo, formulas are configured directly in the data source and are automatically evaluated during the initial rendering of the grid. Whenever the values of dependent cells change, the calculated fields are instantly recalculated and updated. Formula calculations are enabled for the Gross Amount, Tax Amount, and Total Amount columns by setting the allowFormula property to true. Double-click a cell to edit its value and recalculate formulas automatically.

The formulas used are:

  • Gross Amount = Quantity × Price Per Unit
  • Tax Amount = Gross Amount × 0.07
  • Total Amount = Gross Amount + Tax Amount

When the "Quantity" or "Price Per Unit" values are modified, the Data Grid automatically recalculates the related formula-driven columns, ensuring that all computed values remain accurate and synchronized in real time.

More information on editing configuration can be found in the documentation section.

Looking for the full ASP.NET Core Data Grid component overview, features, pricing, and documentation? Visit our ASP.NET Core Data Grid component page.

Transform your ASP.NET Core web apps today with Syncfusion® ASP.NET Core components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab