TopGrid usage



I have a 2 column tsGrid. The first column has a TtsDateTimeDef. I need to clear the date from the cell programatically. The below code does not do it.
I also tried setting the row in question to selected and doing a DeleteSelectedRows, which also did not clear the cell holding the date. Please, no suggestions for a different grid component.
Thanks,
MikeR


procedure TfrmSetup.tsGridAlarmCellEdit(Sender: TObject; DataCol,
 DataRow: Integer; ByUser: Boolean);
var
 i: integer;
 s1,s2:string;
begin
 for i := 1 to tsGridAlarm.Rows do
 begin
   if (tsGridAlarm.Cell[1,i] = tsGridAlarm.Cell[1,DataRow]) and
      (length(tsGridAlarm.Cell[1,i]) > 0 ) and (i <> DataRow) then
   begin
     MessageDlg('Cannot have multiple events on the same date.', mtInformation,[mbOK],0);
     s1 := tsGridAlarm.Cell[1,DataRow];  <<<=== contains 1/19/2006
     tsGridAlarm.Cell[1,DataRow] := '';
     tsGridAlarm.DeleteRows(DataRow,DataRow);
//or tsGridAlarm.RowSelected[DataRow] := true;
//   tsGridAlarm.DeleteSelectedRows;
     tsGridAlarm.RefreshData(roBoth,rpNone);
     s2 := tsGridAlarm.Cell[1,DataRow];  <<<=== blank (but the cell displays the date)
   end;
 end;
 tsGridAlarm.Rows := 20;
end;

This works:
procedure TfrmSetup.btnAlarmDeleteClick(Sender: TObject);
begin
  tsGridAlarm.DeleteSelectedRows;
end;
.