FNCDataGrid filter issues

Hi,
I'm working with the FNC Data Grid in TMS Web Core and trying to use filter controls in a fixed row, similar to the FilterRow demo. However, I'm encountering a few issues:

  • In both the demo and my project, the columns are set to FilterEditorType = gfetAutomatic, but for string-based columns, it seems to incorrectly default to a Date Picker.
  • Additionally, the gfetNumber and gfetFloat FilterEditorTypes don't appear to trigger the filter correctly.

Also, I'm not sure if I'm missing something, but whenever I set Options.Filtering.Advanced = true, all the filtering controls disappear except for the filter button—which then stops working entirely.

Hi,

For the date picker issue, this is a TMS WEB Core issue and is being looked at.
for the number & float editor types, this was a bug in TMS FNC Data Grid is meanwhile fixed. Next version of TMS FNC UI Pack will address this. when setting Options.Filtering.Advanced := True, it switches to the advanced filter builder, but unfortunately this is not supported for TMS WEB Core.

Thank you for reporting!

1 Like

Thank you, Pieter.

I'm trying to use the filter editors in different ways, depending on specific needs—such as filtering directly on the grid, creating a remote query, or filtering the DataSet.

This last case is where I've encountered another issue: when interacting with the DataSet (e.g., filtering, navigating, etc.), the grid refreshes and seems to do something with the row that contains the filter controls, which results in an error. This might be due to a mistake in how I've set up the grid, but I haven't been able to pinpoint what's causing the problem.

I'm attaching the modified project to demonstrate the issue:
CARS - FilteringDemo.zip (745.9 KB)

PS. This demo doesn't include any logic for applying the filter controls directly to the DataSet, so please use the filter controls I've placed on the toolbar instead.

We are able to reproduce the error cleaning up controls and are investigating.

1 Like

I'll be waiting for the update!

Meanwhile, I’d like to report another issue: removing all the text from the filter editor does not result in the filter being removed. I’ve noticed that the last character (technically the first) doesn’t get properly deleted and still appears in the edit field within the filter options popup. As a result, the onRemoveFilter event does not trigger.

The bug with OnRemovefilter has been fixed. Thanks for reporting.

1 Like

Upon further analysis of the grid's behavior and events, I noticed that onBeforeDrawCell is triggered multiple times during each interaction, causing all cells to be redrawn 4 to 5 times. I don't know whether this is how, by standard, all the properties are applied to the grid, but introducing additional customization through onBeforeDrawCell leads to noticeable performance slowdowns—particularly on older machines.

In fact, performance is really poor when using BeforeDrawCell and AfterDrawCell events.
Moving from one record to another is very slow, especially on slower PCs, because events are called multiple times and for ALL cells in the grid, whereas, in theory, when navigating, they should only be called for the relevant cells.
And so, for now, we don't have a web usable software.
Any hint for solve or obtain better performance on navigate rows?
Also you FilterRow demo is slow on navigate.(and don't have code in events)

It's possible that OnBeforeDrawCell & OnAfterDrawCell is called multiple times, especially when pixel scrolling. The events are there to add custom drawing or eliminate certain elements. It's not intended to have a large amount of code processing. If there is something that needs to be checked dynamically, it's suggested to use OnGetCellLayout or OnGetCellProperties, or add a custom cell upon creation, when can then be referenced in the cell drawing events. Is there anything particular that you want to draw or change, I'll be able to provide a better answer. Additionally, please keep in mind that the data-grid is drawn on an HTML5 canvas, the cells are not real HTML elements, which affects performance comparing to drawing on an HTML5 canvas. As an alternative you could checkout AGGrid implementation in TMS WEB Core. TMS Software | Blog

AgGrid is fast, but it doesn't have summary and other features (in the TMS release), as well as having bugs in the filters and no binding to client datasets.
Basically, we need to abandon the idea of ​​having a grid that allows for both filters (even with remote queries) and totals, summaries, and groupings, linked to datasets.
Which we can normally do with Unigui, but that I need also in TMS WEB Core.
To be precise, FNCGrid is slow only when scrolling rows and cells with arrow keys (an operation everyone can do), and on slower PCs. It's not slow if I scroll with the scrollbar, or during the initial display.
Are you sure it's not possible to optimize this aspect?

Are you referring to TMS FNC Grid, or TMS FNC Data Grid? Maybe you could try with setting scrolling mode to cell scrolling instead.

I refer to FNC Data Grid, sorry.
Even if scrolling mode to cell, performance are the same

Can you point me to a demo where you experience the slowness? In which circumstances? I'll investigate and see if anything can be done about it.

The demo used here is the FilterRow demo, found in the Advanced demos folder.

In this zip file, you'll find two videos—appropriately named—to demonstrate performance on two different machines:

DataGrid Demo videos.zip (2.8 MB)

Due to file-size limitations I can't show more, but there is a noticeable input lag on almost every interaction with the grid.

Please let us know if you plan to investigate and improve cell-by-cell or row-by-row navigation.
Especially with active filters and other features enabled, navigation is becoming increasingly slow.
Otherwise, we'll have to find another solution, as this isn't currently feasible for users with PCs from a few years ago (unfortunately, this problem is hidden on fast PCs).
I hope you can optimize and resolve this issue quickly (perhaps avoiding excessive repaints) :-)
Thanks

We are currently looking into it, and see if it's possible to increase performance. Please understand though that the technique used to get the grid in WEB is to paint everything on an HTML5 canvas so we are bound to the limitations of what the HTML5 canvas can do in terms of rendering.

Pieter, if there were a fast native HTML grid with data binding to the dataset, filters, summaries, totals, and groupings, we would definitely have used that :-). And right now, the application was already being distributed :-)
(Actually, TWebDbgrid is really bad. TWebDBTableControl could be enhanced with advanced features to replace TWebDbgrid.
Likewise, the excellent TWebDbResponsiveGrid could be made paginable with partial dataset fetching, optionally editable by attaching a panel form at design time (like a TFrame) as a template for every item on display and editing.)
Unfortunately, it's not easy to recreate the same features as the desktop software I want to port, which is essentially based on advanced grids.
I hope to improve the components and succeed in my goal, with your help :-)