Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2004, 06:32 AM
omercan omercan is offline
Member
 
Join Date: Aug 2001
Posts: 89
Default Skip Rows/Records inside a TDBGrid (w/o filter,sql)

How can I have a TDBGrid skip giving out one or more
rows/records, eg.:

if Table1.FieldByName('Value').asinteger > 500 then
... sking this column

if the table/dbgrid is like this:
value Information
----------------------------------
70 Mr.Jackson
600 Mr.Nicleson
140 Mrs.Hendrixson
2000 Mr.Kuala
------------------------------------
then, it should look like this:
value Information
----------------------------------
70 Mr.Jackson
140 Mrs.Hendrixson
------------------------------------
I rather not use Table.filter or SQL.

Can it be done using

procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
begin
if Table1.FieldByName('Value').asinteger > 500 then
exit; // <--- won't work
end;

Thanks omercan@home.nl
Reply With Quote
  #2  
Old 06-30-2004, 06:04 AM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default RE: Skip Rows/Records inside a TDBGrid (w/o filter,sql)

Quote:
I rather not use Table.filter or SQL.
WHY NOT? That is the prefered way of doing this.

MB34
Reply With Quote
  #3  
Old 06-30-2004, 09:46 AM
omercan omercan is offline
Member
 
Join Date: Aug 2001
Posts: 89
Default RE: Skip Rows/Records inside a TDBGrid (w/o filter,sql)

I need SQL to have...sql-queries.
Filtering: I am using an alternativ to BDE....

That's why I can not use either one of them

Omer
Reply With Quote
  #4  
Old 06-30-2004, 11:11 AM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default RE: Skip Rows/Records inside a TDBGrid (w/o filter,sql)

Which alternative, why so secretive? If you want better help, explain better your problem.

MB34
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:59 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.