This sample shows you how to implement ICalcData on a GridDataBoundGrid object whose Datasource property is a data table. The class CalcDataGrid derives the GridDataBoundGrid and implements the ICalcData.
Features:
A form displaying a single instance of the CalcDataGrid populated with data is illustrated below.
CalcGridDataBoundGrid Capable
of Accepting Excel-Like formulas
A CalcGridDataBoundGrid can be tweaked to display any underlying formulae. Notice that in Column B, changing the first cell affects all the other cells of that column.
CalcGridDataBoundGrid Displaying
Formulae
The ICalcData interface has just three methods and one event.
This sample also shows that it is possible to have multiple GridDataBoundGrids in a table control to support a workbook-type application. Cells can be referenced on different grids in a formula.
The following image illustrates multiple GridDataBoundGrids in a tab control.
Workbook of CalcGridDataBound
Grids