The attached demo project illustrates some issues caused by a bug in TWebDataGrid.LoadFromStringand lack of ability to disable theming once enabled.
- Using the default (False) parameter meaning that the header row is not in the loaded data, numerical and text columns sort and edit properly. But when the header row is included, depending on whether the
ColumnDefs are reasserted before or after the data load, numerical sorting reverts to alpha and no cell editing is available.
- After once loading the grid with the headers and then loading without headers, sorting is restored but editing is not (even if the
ColumnDefs are reasserted after the load).
- Themes can be enabled and changed, but cannot be turned off later.
- Note that the item additions to the Column 1 combobox are delayed by one load cycle…?
WebDataGridLoadFromStringBug.zip (9.6 KB)
I see no difference here between setting geometry before or after load. In both cases it looks like:
We could see the issue with disabling the theme and restoring of ColumnDefs settings and will investigate.
I could not see what exactly you mean with combobox item additions that would be delayed? After loading and editing, I always see 3 items in the combobox for Col 1?
With the default string load (no headers) there is essentially no difference between the before and after geometry settings. However, with the Header in Row 0 box checked, I see a big difference. Before:
After:
In both cases, cell editing and column filtering are disabled, and Column 0 sorting is alphabetic rather than numeric.
The col 1 combobox is coded to get 3 additional items (plus the 3 from the Designer) each time the grid geometry is set, giving 6, 9, … items. But the extra items only start appearing after the second grid load.
We are investigating this and will provide feedback asap.
Improvements have been applied that will be in the upcoming beta update today.
Thanks for the updated Beta. I retested the supplied project and found that today’s Beta ignores the first data row when the final LoadFromString parameter is True. I.e, the header row is not updated. In that case, the difference between defining geometry before and after loading was always nil. However, the Theming can now be disabled after enabling. 
The 15June Beta 3.0.0.0 still does not add grid header labels with WDG.LoadFromCSVString(s,',','"',True).
Rather, it just ignores the first CSV row. Is that the intended action? If so, I suggest changing the LSP prompt from "FirstRowColumnLabels=False" to "IgnoreFirstRow=False".
If ColumnDefs.HeaderName is already set, LoadFromCSVString will not overwrite these preset values currently.
So, in your code set
WebDataGrid1.ColumnDefs[0].HeaderName := '';
WebDataGrid1.ColumnDefs[1].HeaderName := '';
WebDataGrid1.ColumnDefs[2].HeaderName := '';
before loading the CSV with included header row.
Thanks for the explanation. (Is this behavior documented and I missed it?)
We will need to make this more clear in the docs