Hi there,
I've got a TRxDBGrid(almost the same with DBGrid just has much more functions) connected to a datasource (which is connected to a tzquery.dataset). The TRxDBGrid Options allow me to have multi selection to rows(Options->dgMultiselect ->True). Can I have multi delete from this TRxDBGrid ? I have connected this TRxDBGrid with a TDBnavigator and when I select more than one row and press the delete button(-) from navigator no multi delete happens. It just deletes the first selected row. I don't want to use TDBnavigator if possible. in order to delete only one row I use the following code:
index := FindColumnIndex(TRxDBGrid1 , 'NUM');//FindColumnIndex finds the index of the column NUM from the TRxDBGrid1
TRxDBGrid1.SelectedIndex := index;
deletednum:= TRxDBGrid1.Columns.Items[index].Field.Value;
if MessageDlg('Delete Number', 'Do you wish to Delete this NUM ?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
begin
DbModule.GeneralQuery.Close;
DbModule.GeneralQuery.Connection := DbModule.ZConnection1;
DbModule.GeneralQuery.SQL.Clear;
DbModule.GeneralQuery.SQL.Text := 'DELETE FROM TABLE WHERE NUM= ' + InttoStr(deletednum);
DbModule.GeneralQuery.ExecSQL;
TRxDBGrid1.DataSource.DataSet.Refresh;
Any help if possible

.
Thank you.