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.