TTMSFNCDataGrid - Filter

fnc.uipack 7.1.1.1

New Grid with Filtering = True and Adapter:

AGrid.FixedColumnCount := 1;

Adapter.KeepData := True;
Adapter.LoadMode := almAllRecords;

When ApplyFilter via code or via dropdown i get:


Debugger Exception Notification

Project AKCWorkbench.exe raised exception class EArgumentOutOfRangeException with message 'List index out of bounds (-1). TList<System.Classes.TCollectionItem> range is 0..16'.

Break Continue Copy Help

:754eae4f KERNELBASE.RaiseException + 0x5f
System.Classes.TCollection.GetItem(-1)
:004af87e TCollection.GetItem + $1A
System.Classes.TCollection.GetItem(???)
FMX.TMSFNCDataGridDatabaseAdapter.{FMX.TMSFNCTypes}TTMSFNCOwnedCollection<FMX.TMSFNCDataGridDatabaseAdapter.TTMSFNCDataGridDatabaseAdapterColumn>.GetItem(-1)
FMX.TMSFNCDataGridDatabaseAdapter.TTMSFNCDataGridDatabaseAdapterColumns.GetItem(-1)
FMX.TMSFNCDataGridDatabaseAdapter.TTMSFNCCustomDataGridDatabaseAdapter.GetFieldIndexAtColumn(-1)
FMX.TMSFNCDataGridDatabaseAdapter.TTMSFNCCustomDataGridDatabaseAdapter.GetFieldAtColumn(-1)
FMX.TMSFNCDataGridDatabaseAdapter.TTMSFNCCustomDataGridDatabaseAdapter.GetColumnDataName(0)
FMX.TMSFNCDataGridData.TTMSFNCDataGridData.GetColumnDataName(0)
FMX.TMSFNCDataGridData.TTMSFNCDataGridData.UpdateFilterBuilderColumns
FMX.TMSFNCDataGridData.TTMSFNCDataGridData.ApplyFilter
FMX.TMSFNCDataGridRenderer.TTMSFNCDataGridRenderer.DoFilterTimer($FFB2100)
FMX.Types.TTimer.DoOnTimer
FMX.Types.TTimer.Timer
FMX.Platform.Timer.Win.TWinTimerService.TimerCallback(0,275,20931,85194796)

Filtering seems to work when Adapter.LoadMode := almBuffered. But then I have other issues with Sorting/AutoSizeRows/empty rows.

Also Button near “Filter” in Filter-Dropdown is not corresponding to StyleSheet?!

Thanks for help…

Hi,

I’ve made improvements, next version will address this. Should you encounter issues after updating, let met now.

Hi,

thank you, but I still have strange behaviour in combination with FMX.TMSFNCDataGridDatabaseAdapter (7.1.1.3).

. sometimes applies filter during popup visible, sometimes after closing
. if number of rows=1 then nothing visible, have to scroll, but rest of grid is destroyed (fixed cols gone)
. sometimes only some rows are deleted and space between just keeps empty
. after resizing filter is cleared (sometimes?!)
. Button in Filter-Dropdown not corresponding to StyleSheet
...

Sorry, but I cannot really use it in this state.

Hi, please provide case by case topics, and steps to reproduce, so we can apply proper fixes