Board index » delphi » How to add item to DBGRID SELECTEDROWS

How to add item to DBGRID SELECTEDROWS

I want to programmatically add a bookmark to the SelectedRows property
of a DBGRID. Since it's of type TBookmarkList, I thought it should
behave somewhat like a Tlist were you can do something like:

DBGRID.SELECTEDROWS.Add(MyBookmark);

But this does not exist. Does anyone know something about this ?

Thanks,

Steve

 

Re:How to add item to DBGRID SELECTEDROWS


        The methods you are looking for are "GetBookMark", "GotoBookMark" and
"FreeBookMark" and they all belong to the TDataSet object (TTable and
TQuery, not sure about TStoredProc).  The bookmarks are attached to the
TDataSet component underlying the TDBGrid component.  
        There are adequate examples in the Help File.
        Good Luck.
--
Rob Tanner B.E.,B.Sc.
Design Engineer
WestBau Technologies, Inc.

scc...@worldonline.nl wrote in article
<5hou53$qp...@neptune.worldonline.nl>...

Quote

> I want to programmatically add a bookmark to the SelectedRows property
> of a DBGRID. Since it's of type TBookmarkList, I thought it should
> behave somewhat like a Tlist were you can do something like:

> DBGRID.SELECTEDROWS.Add(MyBookmark);

> But this does not exist. Does anyone know something about this ?

> Thanks,

> Steve

Re:How to add item to DBGRID SELECTEDROWS


You must use this method (the DBGrid must be in MultiSelect Option)

yourDBGrid.SelectedRows.CurrentRowSelected:=True

scc...@worldonline.nl escribi en artculo
<5hou53$qp...@neptune.worldonline.nl>...

Quote

> I want to programmatically add a bookmark to the SelectedRows property
> of a DBGRID. Since it's of type TBookmarkList, I thought it should
> behave somewhat like a Tlist were you can do something like:

> DBGRID.SELECTEDROWS.Add(MyBookmark);

> But this does not exist. Does anyone know something about this ?

> Thanks,

> Steve

Other Threads