Jump to content


Photo

Rowcount incorrect when using filters


  • Please log in to reply
3 replies to this topic

#1 nosx

nosx
  • Members
  • 11 posts

Posted 20 August 2014 - 01:58 AM

As the title says, when filtering rows in a dbgrid, the Rowcount property does not take this into account and returns the wrong number. For instance if a grid has 20 rows before applying a filter and applying the filter returns only 5 of the 20 rows, the Rowcount property still returns 20 when it should return 5. Anyway solutions for this issue?

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 21 August 2014 - 05:48 PM

Hello,

Can you please tell me how you do the filtering?
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 nosx

nosx
  • Members
  • 11 posts

Posted 26 August 2014 - 05:55 AM

I have a FireDAC Query compoent on my form and I set the filter like so in my code.

Query1.Filtered := False;
Query1.Filter := 'Database_Column_Name_Here =' + QuotedStr('Some String To Filter The Column Upon');
Query1.Filtered := True;


#4 dorivansousa

dorivansousa
  • Members
  • 7 posts

Posted 09 June 2015 - 05:24 PM

Firedac FetchOptions->Mode = fmAll






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users