Comments

1 comment

  • Roy Woll

    Take a look at the multi select grid demo included as part of the main demo.

    procedure TGridMultiSelectForm.DeleteButtonClick(Sender: TObject);
    var
      bookmark: TBookmark;
      i: integer;
    begin
      // Delete multi-selected records
      wwDataGrid1.DataLink.DataSet.DisableControls;
      try
        for i := 0 to wwDataGrid1.SelectedList.Count - 1 do
        begin
          bookmark := wwDataGrid1.SelectedList[i];
          wwDataGrid1.DataLink.DataSet.GotoBookmark(bookmark);
          wwDataGrid1.DataLink.DataSet.Delete;
        end;
        wwDataGrid1.SelectedList.Clear;
      finally
        wwDataGrid1.DataLink.DataSet.EnableControls;
      end;
    end;
    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk