Index
Current row labels, defaulting to range-style labels when no index is supplied.
DataControl is FlexCore's data-aware tabular component. It is inspired by
pandas DataFrame and PowerBuilder DataWindow: one in-memory
table surface that can feed GridControl, ChartControl,
ReportWriterControl, and future data-aware controls.
| Index | Order | Customer | Amount | Open |
|---|---|---|---|---|
| row-a | A100 | Acme | 1280.50 | true |
| row-b | A101 | Northwind | 845.25 | false |
| row-c | A102 | Contoso | 2210.00 | true |
| row-d | A103 | Fabrikam | 1640.75 | true |
The pandas-style constructor accepts heterogeneous input and optional axis labels.
C# uses PascalCase elsewhere, but this signature maps directly to
DataFrame(data=None, index=None, columns=None, dtype=None, copy=None).
var frame = new DataControl(
data: new Dictionary<string, object?>
{
["Order"] = new[] { "A100", "A101", "A102" },
["Customer"] = new[] { "Acme", "Northwind", "Contoso" },
["Amount"] = new object?[] { "1280.50", "845.25", "2210.00" }
},
index: new[] { "row-a", "row-b", "row-c" },
columns: new[] { "Order", "Customer", "Amount" });Current row labels, defaulting to range-style labels when no index is supplied.
Column descriptors: name, caption, data type, nullability, readonly state, and ordinal.
Dictionary of column name to CLR type.
Summary object containing table name, row count, column count, columns, and locale.
Two-dimensional object array of visible values.
Two axes: row labels and column labels.
Always 2 for this tabular control.
Total visible cell count: rows times columns.
Rows and columns as a DataControlShape record.
True when there are no rows or no columns.
Label-based scalar accessor.
Position-based scalar accessor.
At reads or writes a scalar by row label and column name.
Iat reads or writes by zero-based row and column position.
var amount = frame.At["row-a", "Amount"];
frame.At["row-a", "Amount"] = 1300.00m;
var firstCustomer = frame.Iat[0, 1];
frame.Iat[0, 1] = "Acme Industries";ConvertDtypes and InferObjects create converted frames.
Astype forces one or more columns to a requested CLR type.
| Column | Original dtype | After ConvertDtypes |
|---|---|---|
| Order | string | string |
| Customer | string | string |
| Amount | string | decimal |
| Open | string | bool |
var converted = frame.ConvertDtypes();
var decimals = frame.Astype("Amount", typeof(decimal));
var numericOnly = frame.SelectDtypes(include: new[] { typeof(decimal), typeof(int) });ToChartBars and ToChartSeries project the same data into
shapes already accepted by ChartControl.
Returns the first rows as a new DataControl.
Returns the last rows as a new DataControl.
Keeps only the requested columns.
Removes requested columns from a copied frame.
Renames a column on the current frame.
Adds a typed column and initializes existing rows.
Removes rows with null values in selected columns.
Replaces nulls in selected columns.
Filters with a DataTable expression and returns a new frame.
Filters with a DataRow predicate and returns a new frame.
Applies a DataView sort expression.
Groups rows and computes Count, Sum, Average, Min, or Max.
Returns columns matching included and excluded CLR types.
Returns a frame with one, many, or all columns converted to requested types.
Infers better CLR types from object or string columns.
Infers object-backed columns without converting existing string columns.
Creates a copied DataControl; deep copy duplicates the table.
Loads a DataTable from a host-provided async retrieval function.
Replaces the underlying table.
Clears data and selection.
Accepts changes and clears dirty state.
Returns changed rows as a DataTable.
Rolls back pending changes.
Reads or sets the current 1-based row.
Reads a cell by 1-based row and column name.
Writes a cell by 1-based row and column name.
Inserts a row with optional values.
Deletes a row by 1-based row number.
Copies a row range to another DataControl.
Moves a row range to another DataControl.
Removes a row range.
Manages selected row numbers.
Exports selected rows as a DataTable.
Reads simple metadata and DataWindow-style properties.
Sets supported DataWindow-style properties.
Finds the first row matching a DataTable expression.
Exports to CSV or JSON text.
Projects visible rows as ExpandoObject instances for dynamic grid binding.
Projects rows as dictionaries keyed by column name.
Projects rows as dynamic ExpandoObject records.
Builds multi-series chart data.
Builds legacy ChartControl bar data.
Creates ReportColumn definitions from the schema.
Creates a basic ReportDefinition from the current schema.
Serializes visible rows as JSON.
Serializes visible rows as CSV.
DataControlColumnDataControlInfoDataControlShapeDataControlAtIndexerDataControlIatIndexerDataControlAggregateResultDataControlRowChangedEventArgsDataControlAggregateDataControlSaveFormat