Board index » delphi » Multiselect in DBGrid???

Multiselect in DBGrid???

Hello,

I'm using Delphi 2.0 with the new DBGrid component where you have
the option to set multiselect on.
How do I know how many and wich records are selected in such a DBGrid ?  

Thanks in advance,
Pascal Corstjens
Belgium

Co...@glo.be

 

Re:Multiselect in DBGrid???


Quote
Pascal Corstjens (gd30...@glo.be) wrote:

: Hello,

: I'm using Delphi 2.0 with the new DBGrid component where you have
: the option to set multiselect on.
: How do I know how many and wich records are selected in such a DBGrid ?  

: Thanks in advance,
: Pascal Corstjens
: Belgium

: Co...@glo.be

Hi:
        Try this:

Var
  i : Integer;

Begin
  With DBGrid1.SelectedRows Do Begin
    For i := 0 To (Count - 1) Do Begin
      GotoBookMark(TBookMark(Items[i]));
      // DoSomething...

    End;
  End;
End;

        Hope the help.

PD:  Look TBookMark for a best comprention.  And Excuse my bad english.

Regards,
Luis Auca~nir, Santiago de Chile.
SOLEX S.A. lauca...@vallenar.ing.puc.cl

Re:Multiselect in DBGrid???


Hello:
        Sorry, but, in the prev post I had a mistake.  It's the truth:

Table1.GotoBookMark(TBookMark(Items[i]));

Luis Auca~nir.

Other Threads