TTMSFMXGrid custom formatting

I am using livebinding between a dataset and a TTFSFMXGrid.


One of the columns is showing a date, and I would like to do custom formatting, e.g. prefixing the date with the weekday name. Setting a "displayformat" on the column in the dataset changes nothing, and I can se nowhere to change the "displayformat" in the grid.

What am I missing?

Regards
Thomas

Hi, 


You can use the following code to accomplish this:

var
  dt: TDateTime;
begin
  if ACol = 9 then
  begin
    if TryStrToDateTime(CellString, dt) then
      CellString := FormatDateTime('dddd, dd/mm/yyyy', dt);
  end;

Kind Regards, 
Pieter

Thanks a lot

I think that I should use the OnGetCellData event, and in fact that was exactly the event that I was missing.

Regards
Thomas