1. Five-Minute Quick Start
You do not need to write JSON to use neoGrid.
- Add neoGrid Data Table to the page.
- In Data File, choose a UTF-8
.csv,.tsvor.jsonfile. - Leave File Format set to Detect Automatically.
- For CSV or TSV, keep First Row Contains Column Names enabled.
- Run the publication. The grid creates the columns and loads the rows.
The search bar filters every column while the user types. Search is not case sensitive and ignores common accents, so cafe also finds Café. The status line shows the visible and total row counts.
For a CSV file such as:
SKU,Product,Stock,Price,Active
A-100,Desk lamp,14,39.95,true
A-220,Café notebook,80,4.50,true
neoGrid automatically creates five columns. No column IDs or schemas are required for this workflow.
2. The Easiest Actions
The neoGrid - Quick Start action category avoids JSON and row IDs.
| Action | Parameters after ObjectName | Effect |
|---|---|---|
neoGridSearch | SearchText | Filters all columns. |
neoGridClearSearch | none | Shows every row again. |
neoGridReloadFile | none | Reloads the most recently loaded file. |
neoGridAddRowValues | RowValues | Adds one CSV-formatted row in column order. |
neoGridDeleteSelected | none | Deletes the selected row; does nothing if no row is selected. |
neoGridSearch "InventoryGrid" "lamp"
neoGridClearSearch "InventoryGrid"
neoGridAddRowValues "InventoryGrid" "B-410,Wireless keyboard,18,29.95,true"
neoGridDeleteSelected "InventoryGrid"
neoGridReloadFile "InventoryGrid"
Quote a value using normal CSV rules when it contains a comma:
neoGridAddRowValues "InventoryGrid" "B-420,[#34]Notebook, A5[#34],25,3.95,true"
3. Main Properties
| Property | Default | Description |
|---|---|---|
dataFile | empty | CSV, TSV or JSON file selected with the file picker. |
fileFormat | auto | Automatic detection, or force csv, tsv or json. |
firstRowIsHeader | true | Uses the first CSV/TSV row as column names. |
showToolbar | true | Shows the built-in search bar. |
showStatusBar | true | Shows visible and total row counts. |
initialFilter | empty | Optional search applied when the page opens. |
locale | auto | English, Spanish, Italian, German or Russian; auto follows VisualNEO. |
editable | true | Allows editing compatible cells. |
readOnly | false | Prevents editing even when editable is enabled. |
selectionMode | cell | Selects individual cells or complete rows. |
showHeaders | true | Shows column headers. |
showRowNumbers | true | Shows the leading row number. |
allowSort | true | Sorts by clicking a column header. |
allowColumnResize | true | Allows interactive column resizing. |
alternateRows | true | Alternates row background colors. |
autoFitColumns | false | Fits widths to content after refresh or loading. |
rowHeight | 24 | Row height from 16 to 96 pixels. |
headerHeight | 28 | Header height from 18 to 120 pixels. |
The grid inherits background, border and text styling from the VisualNEO Style Palette. Advanced style actions may override individual colors at runtime.
4. Loading Data at Runtime
Use neoGridLoadFile when the path is decided by script instead of the property editor. VisualNEO expands variables such as [PubDir] before calling the plugin.
neoGridLoadFile "InventoryGrid" "[PubDir]inventory.csv" "auto" "True"
JSON files may be either a simple array of objects or an object containing columns and rows. With a simple array, neoGrid infers columns automatically:
[
{"product":"Desk lamp","stock":14,"active":true},
{"product":"Café notebook","stock":80,"active":true}
]
CSV and TSV support UTF-8, quoted fields, embedded delimiters, quotes and line breaks.
5. Advanced JSON Setup
Use Advanced: Columns JSON only when you need stable IDs, typed validation, custom widths, alignment, hidden columns or per-column editing rules. Rows JSON is optional and columns are inferred when it is used alone.
[
{"id":"sku","title":"SKU","type":"string","width":110,"editable":false},
{"id":"product","title":"Product","type":"string","width":240},
{"id":"stock","title":"Stock","type":"integer","width":90,"alignment":"right"},
{"id":"price","title":"Price","type":"number","width":100,"alignment":"right"},
{"id":"active","title":"Active","type":"boolean","width":80,"alignment":"center"}
]
Supported column types are string, number, integer and boolean. Alignment can be left, center or right. Set visible to false to hide a column. A grid accepts up to 256 columns.
Object rows may contain an id. neoGrid generates a stable ID when omitted.
6. Data and Utility Actions
These actions provide full programmatic control. Mutating actions write a useful result or error to [neoGridResult].
| Action | Parameters after ObjectName | Result or effect |
|---|---|---|
neoGridSetColumns | ColumnsJson | Replaces column definitions. |
neoGridSetData | RowsJson | Replaces rows and infers columns when needed. |
neoGridLoadFile | File, optional format and header flag | Loads UTF-8 JSON, CSV or TSV. |
neoGridAddRow | RowJson | Adds an object or positional array. |
neoGridUpdateRow | RowId, ChangesJson | Updates fields in a row. |
neoGridDeleteRow | RowId | Deletes a row by ID. |
neoGridClear | none | Removes rows and preserves columns. |
neoGridGetCell | RowId, ColumnId | Returns one value. |
neoGridSetCell | RowId, ColumnId, Value | Validates and changes a value. |
neoGridGetRow | RowId | Returns one row as JSON. |
neoGridGetSelected | none | Returns the selected row ID. |
neoGridSelectRow | RowId | Selects and reveals a row. |
neoGridSort | ColumnId, direction | Sorts with the column's data type. |
neoGridExportCsv | File, optional format/header | Saves UTF-8 CSV or TSV. |
neoGridGetInfo | none | Returns counts, filter, selection and sort state. |
neoGridRefresh | none | Rebuilds and redraws the grid. |
7. Style Actions
Style priority is: VisualNEO Style Palette, global grid style, column style, row style, then cell style. A later layer replaces only the attributes it specifies.
| Action | Parameters after ObjectName |
|---|---|
neoGridSetStyle | StyleJson |
neoGridSetColumnStyle | ColumnId, StyleJson |
neoGridSetRowStyle | RowId, StyleJson |
neoGridSetCellStyle | RowId, ColumnId, StyleJson |
neoGridClearStyles | none |
neoGridResetStyle | none |
Global fields are backgroundColor, alternateColor, textColor, gridColor, selectionColor, headerColor and headerTextColor. Colors use #RRGGBB. Column, row and cell styles accept backgroundColor, textColor, bold and italic.
neoGridSetStyle "InventoryGrid" "{[#34]headerColor[#34]:[#34]#165D6B[#34],[#34]headerTextColor[#34]:[#34]#FFFFFF[#34]}"
neoGridSetColumnStyle "InventoryGrid" "stock" "{[#34]backgroundColor[#34]:[#34]#FFF4CC[#34],[#34]bold[#34]:true}"
neoGridResetStyle "InventoryGrid"
VisualNEO uses [#34] to insert a double quote inside a quoted action parameter. Use it for JSON keys and string values so the complete JSON remains one action parameter.
8. Events
| Event | Important payload fields |
|---|---|
selection-change | rowId, rowIndex, columnId, columnIndex, value |
cell-click | Same cell payload. |
cell-double-click | Same cell payload. |
cell-change | Cell payload plus previousValue. |
sort-change | columnId, direction. |
validation-error | rowId, columnId, reason. |
filter-change | filter, visibleRowCount, rowCount. |
9. Included Demos
Open demo/neoGrid-demo.pub for the shortest introduction. It demonstrates CSV loading, built-in search, adding and deleting rows, reloading data and reading grid information. Keep inventory.csv beside the publication.
Open demo/neoGrid-complete-demo.pub for an end-to-end tour. It loads the typed inventory.json data set and provides buttons for:
- searching and clearing the filter;
- adding, deleting, selecting and editing rows;
- sorting a numeric column;
- reading the selection and complete grid state;
- applying global, row and cell styles;
- clearing styles and exporting the current data to CSV.
Keep inventory.json beside the complete publication. The Export CSV button creates inventory-export.csv in the same directory. The example uses stable row IDs (row-001 to row-004) and column IDs (sku, product, stock, price and active) so every advanced action is visible and easy to inspect in VisualNEO Win.
10. Performance
neoGrid 1.1.1 keeps Virtual TreeView and optimizes the data layer around it. Row and column IDs use indexed lookup, repeated VisualNEO lifecycle snapshots do not reload unchanged JSON, CSV is transferred directly into the model, and search text is normalized once per changed row set. The SDK development workspace includes a performance test for 10,000 rows by default and accepts a custom row count for larger regression runs.
Large JSON and CSV files are still held in memory. Use stable row IDs and avoid replacing the complete dataset when a cell or existing row can be updated.
11. Notes
- CSV and TSV input and output use UTF-8.
- Numeric JSON uses an invariant decimal point.
- Row numbers show the current sorted order and are not stable IDs.
- Advanced actions should use row and column IDs rather than visible indexes.
neoGridReloadFileworks after either Data File orneoGridLoadFileloads a file.