how to filtered selected record in dbgrid by sdac

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
minair2004
Posts: 5
Joined: Thu 26 Nov 2009 14:28
Location: iran
Contact:

how to filtered selected record in dbgrid by sdac

Post by minair2004 » Thu 26 Nov 2009 14:37

hi
i hve code in ado

Code: Select all

 var
  x: Integer;
  BMList: array of TVarRec;
begin
  SetLength(BMList, dbgrid1.SelectedRows.Count);
  for X:=0 to dbgrid1.SelectedRows.Count - 1 do
  begin
    BMList[x].VType := vtPointer;
    BMList[x].VPointer := Pointer(dbgrid1.SelectedRows[x]);
    DataModule1.ADOTable1.GotoBookMark(BMList[x].VPointer);
  end;
  DataModule1.ADOTable1.FilterOnBookmarks(BMList);
end;
[code]

i hve need in sdac with msquery or mstable?????

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 27 Nov 2009 08:05

SDAC doesn't support FilterOnBookmarks. You can use the Filter and FilterSQL poperties to filter records.

minair2004
Posts: 5
Joined: Thu 26 Nov 2009 14:28
Location: iran
Contact:

Post by minair2004 » Fri 27 Nov 2009 13:18

Dimon wrote:SDAC doesn't support FilterOnBookmarks. You can use the Filter and FilterSQL poperties to filter records.

TANKS
HOW?

minair2004
Posts: 5
Joined: Thu 26 Nov 2009 14:28
Location: iran
Contact:

Post by minair2004 » Mon 30 Nov 2009 08:22

please answers me

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 30 Nov 2009 09:04

SDAC doesn't support filter by bookmarks.
As workaround solution you can create additional calculated boolean field, make it invisible, and use filtering on this field. You can look at the example of filtering usage in the FilterAndIndex item of the SDAC demo.

Post Reply