#1 2012-05-29 17:06:38

lele9
Member
Registered: 2011-10-28
Posts: 170

ttimelog and fillstringgrid

hi there,
i have a ttimelog property in a tsqlrecordclass where i would like to store only the time.
and i wouold like to show in the grid (with fillstringgrid) only the time.
i dont use SQLite3i18n.
i dont understand how do this.
thanks,
Emanuele.

Offline

#2 2012-05-29 17:14:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: ttimelog and fillstringgrid

If you use TSQLTableToGrid, set the TSQLTableToGrid.OnValueText event handler to a custom handler.
So for the TTimeLog column, you can return only the time.

  /// kind of event used to change some text on the fly for grid display
  // - expect generic string Text, i.e. UnicodeString for Delphi 2009/2010,
  // ready to be used with the VCL for all Delphi compiler versions
  // - if the cell at FiieldIndex/RowIndex is to have a custom content,
  // shall set the Text variable content and return TRUE
  // - if returns FALSE, the default content will be displayed 
  TValueTextEvent = function(Sender: TSQLTable; FieldIndex, RowIndex: Integer; var Text: string): boolean of object;

If you do not use TSQLTableToGrid, you'll need to search in the grid display, how to customize a row content.

Offline

Board footer

Powered by FluxBB