Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

delete multiple selected rows in DBGrid

[es] :: Pascal / Delphi / Kylix :: delete multiple selected rows in DBGrid

[ Pregleda: 3132 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

DeYo
Dejan Vukmirovic
developer @ Mogul
Pozarevac/Bgd/Stockholm

Član broj: 36771
Poruke: 85
*.etf.bg.ac.yu.

Sajt: www.linkedin.com/in/dejan..


Profil

icon delete multiple selected rows in DBGrid25.02.2005. u 19:58 - pre 233 meseci
Dakle,
imam DBGrid, ADOQuery, ADODataSet
u DBGrid-u sam omogucio MultipleSelect, iskljucio ConfirmDelete i CancelOnExit

Pitanje: kako da obrisem sve selektovane redove iz DBGrid-a?
Svejedno mi je kako, da li ADOQuery-jem, direktno iz DBGrid-a...

Ima li neko resenje? Ja se ubih trazeci po netu i nista. A prob'o sam i sam da resim - i opet nista.
 
Odgovor na temu

_v!rus_
BGD

Član broj: 40451
Poruke: 313
*.vdial.verat.net.



+1 Profil

icon Re: delete multiple selected rows in DBGrid26.02.2005. u 05:44 - pre 233 meseci
Varijanta 1
Code:

DBGrid1.SelectedRows.Delete;

Varijanta 2
Code:

var
  I: Integer;
begin
  if DBGrid1.SelectedRows.Count>0 then
    with DBGrid1.DataSource.DataSet do
      for I := 0 to DBGrid1.SelectedRows.Count - 1 do
      begin
        GotoBookmark(pointer(DBGrid1.SelectedRows.Items[I]));
        Delete;
      end;
end;

 
Odgovor na temu

DeYo
Dejan Vukmirovic
developer @ Mogul
Pozarevac/Bgd/Stockholm

Član broj: 36771
Poruke: 85
*.etf.bg.ac.yu.

Sajt: www.linkedin.com/in/dejan..


Profil

icon Re: delete multiple selected rows in DBGrid02.03.2005. u 16:37 - pre 233 meseci
To je to.

Fala.
 
Odgovor na temu

[es] :: Pascal / Delphi / Kylix :: delete multiple selected rows in DBGrid

[ Pregleda: 3132 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.