VisualNEO Win Plugin Manual

neoGrid - Easy Data Table for VisualNEO Win

Plugin ID:com.visualneo.neogrid
Version:1.1.1
Suite:VisualNEO UI & Data Suite (Commercial)
Publisher:SinLios
Category:Data / Data Grids & Tables
Control:neo-grid

1. Five-Minute Quick Start

You do not need to write JSON to use neoGrid.

  1. Add neoGrid Data Table to the page.
  2. In Data File, choose a UTF-8 .csv, .tsv or .json file.
  3. Leave File Format set to Detect Automatically.
  4. For CSV or TSV, keep First Row Contains Column Names enabled.
  5. 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:

CSV
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.

ActionParameters after ObjectNameEffect
neoGridSearchSearchTextFilters all columns.
neoGridClearSearchnoneShows every row again.
neoGridReloadFilenoneReloads the most recently loaded file.
neoGridAddRowValuesRowValuesAdds one CSV-formatted row in column order.
neoGridDeleteSelectednoneDeletes the selected row; does nothing if no row is selected.
TEXT
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:

TEXT
neoGridAddRowValues "InventoryGrid" "B-420,[#34]Notebook, A5[#34],25,3.95,true"

3. Main Properties

PropertyDefaultDescription
dataFileemptyCSV, TSV or JSON file selected with the file picker.
fileFormatautoAutomatic detection, or force csv, tsv or json.
firstRowIsHeadertrueUses the first CSV/TSV row as column names.
showToolbartrueShows the built-in search bar.
showStatusBartrueShows visible and total row counts.
initialFilteremptyOptional search applied when the page opens.
localeautoEnglish, Spanish, Italian, German or Russian; auto follows VisualNEO.
editabletrueAllows editing compatible cells.
readOnlyfalsePrevents editing even when editable is enabled.
selectionModecellSelects individual cells or complete rows.
showHeaderstrueShows column headers.
showRowNumberstrueShows the leading row number.
allowSorttrueSorts by clicking a column header.
allowColumnResizetrueAllows interactive column resizing.
alternateRowstrueAlternates row background colors.
autoFitColumnsfalseFits widths to content after refresh or loading.
rowHeight24Row height from 16 to 96 pixels.
headerHeight28Header 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.

TEXT
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:

JSON
[
  {"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.

JSON
[
  {"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].

ActionParameters after ObjectNameResult or effect
neoGridSetColumnsColumnsJsonReplaces column definitions.
neoGridSetDataRowsJsonReplaces rows and infers columns when needed.
neoGridLoadFileFile, optional format and header flagLoads UTF-8 JSON, CSV or TSV.
neoGridAddRowRowJsonAdds an object or positional array.
neoGridUpdateRowRowId, ChangesJsonUpdates fields in a row.
neoGridDeleteRowRowIdDeletes a row by ID.
neoGridClearnoneRemoves rows and preserves columns.
neoGridGetCellRowId, ColumnIdReturns one value.
neoGridSetCellRowId, ColumnId, ValueValidates and changes a value.
neoGridGetRowRowIdReturns one row as JSON.
neoGridGetSelectednoneReturns the selected row ID.
neoGridSelectRowRowIdSelects and reveals a row.
neoGridSortColumnId, directionSorts with the column's data type.
neoGridExportCsvFile, optional format/headerSaves UTF-8 CSV or TSV.
neoGridGetInfononeReturns counts, filter, selection and sort state.
neoGridRefreshnoneRebuilds 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.

ActionParameters after ObjectName
neoGridSetStyleStyleJson
neoGridSetColumnStyleColumnId, StyleJson
neoGridSetRowStyleRowId, StyleJson
neoGridSetCellStyleRowId, ColumnId, StyleJson
neoGridClearStylesnone
neoGridResetStylenone

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.

TEXT
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

EventImportant payload fields
selection-changerowId, rowIndex, columnId, columnIndex, value
cell-clickSame cell payload.
cell-double-clickSame cell payload.
cell-changeCell payload plus previousValue.
sort-changecolumnId, direction.
validation-errorrowId, columnId, reason.
filter-changefilter, 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.
  • neoGridReloadFile works after either Data File or neoGridLoadFile loads a file.