Suprressed row and filter problems

Good mornig to all,

I still have some problems with the grid and suppressed row.



1 - when the grid is loaded with lastrow i get the number of the row.

     If i suppress some row, the lastrow property does not return the correct row number.

     here's a way to get this number or i need to do it ?

2 - Which is the rigth mode to work ?

     Apply the filter after or before suppress the rows ?

     If it's egual, when the filter is applied after suppressed some row, the filter action is a

     quite slow if it's compared with non suppressed row.

3 - After suppressed some rows and pressed pagedow/pageup key or used mouse wheel,

     sometime the cursor position is missing (disappear).



With normal grid (without using suppressed row) i have this problem (if it is)

Grid with severals columns where 2=quantity 4=Brand 5=Date

1 AdvEdit with it's text i use a narrowdown function

when the grid is loaded with the edit i used narrowdown according with the text on column 4 and it's work well.

When i try to filter manually i have this situation



If i filter only for column 2 > 0 it's work



with SG1.Filter.Add do

begin

    Column:=2;

    Condition:='> 0';

end;



If i add a second filter on column 5 , for any date < today - 3 months it's work (so i have 2 filters)



S:='< ' + FormatDateTime('dd/mm/yyyy', IncMonth(DP1.Date,-3));

with SG1.Filter.Add do

begin

    Column:=5;

    Condition:=S;

end;



If i add the last filter like this



if Edt1.Text<>'' then

begin

    with SG1.Filter.Add do

    begin

      Column:=4;

      Condition:='= ' + QuotedStr(Edt1.Text + '*');

    end;

end;



the grid will be empty.



Before filter the grid, i remove all any present filter (included narrowdown) and , if present, unsuppressed all rows.



I use the last component version.



where i wrong ??



Thank's for all



Regard



Daniele

  1. Suppressed rows are not taken in account for LastRow calculation
    2. You can suppress rows before or after filtering.It should not matter. To suppress rows, it should be slightly faster to suppress after filter than before.
    3. We'll investigate
    4. I do not see the logical operator between your multiple filter conditions. Are these supposed to be OR or AND operations? If so, please set the filter condition operation also from the 2nd filter condition added.

Good morning Bruno,

1. Ok

2. Now i'll suprress the row after the filter.

3. Waiting ....

4. You suppose rigth .... the logical is foAnd.

     I setted, for the seconf condition Operation:=foAND; but i got the same result.

     So i tried do this

     Condition:= '="' + Edt1.Text + '*"';

     Note the " (shift 2), with this the filter works (not always).

     Can you check this situations?



Thank's for all, regards



Daniele

Can you please try to isolate this issue and provide some sample source app with which we can reproduce this, as this way, we don't know all your property settings, event handlers, .... so there is a lot of guesswork on our side about what exactly you are doing.
Please contact us via email support with some sample source project and detailed steps to reproduce the problem.

Hi Bruno,

i'll send you little demo to reproduce this.



Thank's for all



Have nice weekend



Daniele