DBAdvGrid and Filtering Issues

Using Version 6.8.1.0



Use a DBAdvGrid (named MarkersGrid) and AdvComboBox (named MarkerGroupingCombobox)



Link the grid to whatever dataset you want



Set the DBAdvGrid properties of FilterDropDownAuto to True, FilterDropDownCheck to True



Run the program



Change the grouping choice by choosing a selection from the combobox



Bug appears now

The filter drop down list of the first column will now contain items from the first column AND the items from the column used for the grouping. The additional drop down filters will have a blank choice at the top of the filter list.



If you close the form with any grouping option enabled and any filter checked you get a debugger exception notification of project raised exception class EInvalidGridOperation with message 'Grid index out of range'



If you choose a grouping from the drop down box, then check a filter, then change the grouping via the drop down box to "No Grouping" (See below) and click on the filter drop downs you can cause other issues as well such as the column headers appearing in the second row or EListError exceptions with message 'List Index out of bounds (-1).





Additional Info...



// populate the combobox

procedure TMainForm.FormShow(Sender: TObject);

var

I: Integer;

begin

MarkerGroupingCombobox.Items.Add('No Grouping');

for I := 1 to MarkersGrid.ColCount-1 do

    begin

      MarkerGroupingCombobox.Items.Add(MarkersGrid.Cells[I, 0]);

    end;

   MarkerGroupingCombobox.ItemIndex := 0;

end;



// change the grouping based on the combobox selection

procedure TMainForm.MarkerGroupingComboboxChange(Sender: TObject);

begin

if MarkerGroupingCombobox.ItemIndex = 0 then

    MarkersGrid.UnGroup

else

    MarkersGrid.Group(MarkerGroupingCombobox.ItemIndex);

end;





Have you guys been able to verify or check this?

Sorry, unfortunately grouping & filtering are currently 2 mutually exclusive features.

OK, thanks Bruno.