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;