Board index » delphi » Multiselect and dbgrid

Multiselect and dbgrid

Hello,
I would like to print in one time all data which are selectionned in
multiselect in DBGRID.
if someone could show me an example.
thanks a lot!

PS:execuse me for the english but I am french!

 

Re:Multiselect and dbgrid


Hi Philippe, here it is

DataSet.First;
while not DataSet.eof do begin
    if DBGrid.SelectedRows.CurrentRowSelected then begin

        {...PrintingCode goes in here...}

    end;
    DataSet.Next;
end;

/Marcus

Philippe skrev i meddelandet <01be6ed5$455d89c0$6f00008a@yan-solo>...

Quote
>Hello,
>I would like to print in one time all data which are selectionned in
>multiselect in DBGRID.
>if someone could show me an example.
>thanks a lot!

>PS:execuse me for the english but I am french!

Re:Multiselect and dbgrid


for i := 0 to SMDBGrid.SelectedRows.Count-1 do
begin
    SMDBGrid.DataSource.DataSet.Bookmark := SMDBGrid.SelectedRows[i];

    {print a one record}
...
end;

--
With best regards, Mike Shkolnik.
FIDO: 2:463/106.14
E-Mail: mshkol...@rs-ukraine.kiev.ua
        m...@woccu.freenet.kiev.ua
WEB: http://www.geocities.com/SiliconValley/Grid/3989

Philippe D??? ???Y?? <01be6ed5$455d89c0$6f00008a@yan-solo> ...

Quote
>Hello,
>I would like to print in one time all data which are selectionned in
>multiselect in DBGRID.
>if someone could show me an example.
>thanks a lot!

>PS:execuse me for the english but I am french!

Other Threads