Page 1 of 1

how to filtered selected record in dbgrid by sdac

Posted: Thu 26 Nov 2009 14:37
by minair2004
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?????

Posted: Fri 27 Nov 2009 08:05
by Dimon
SDAC doesn't support FilterOnBookmarks. You can use the Filter and FilterSQL poperties to filter records.

Posted: Fri 27 Nov 2009 13:18
by minair2004
Dimon wrote:SDAC doesn't support FilterOnBookmarks. You can use the Filter and FilterSQL poperties to filter records.

TANKS
HOW?

Posted: Mon 30 Nov 2009 08:22
by minair2004
please answers me

Posted: Mon 30 Nov 2009 09:04
by Dimon
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.