Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Format Column in Grid
Mon, Jul 8 2013 5:32 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Is there any way to specify formatting for a column within a grid, or
overriding custom drawing to change the format.

Another option would be to be able to set the data source for a grid to
be an array of items so that I could specify my own format with the item
class.

--
Chris Holland
[Team Elevate]
Mon, Jul 8 2013 2:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< Is there any way to specify formatting for a column within a grid, or
overriding custom drawing to change the format. >>

What do you mean by "formatting" ?  Do you mean the display of the text ?
If so, then yes, you can use these events:

http://www.elevatesoft.com/manual?action=viewevent&id=ewb1&comp=TDataColumn&event=OnGetText
http://www.elevatesoft.com/manual?action=viewevent&id=ewb1&comp=TDataColumn&event=OnSetText

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jul 9 2013 3:19 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Thanks Tim, that was exactly what I was looking for.

However as it was a Date/Time string that I wanted to format I have
found the FormatSettings.ShortTimeFormat that I think I should be able
to set to do this for me.

I have tried setting the following in the Form OnShow() event

FormatSettings.ShortTimeFormat := 'HH:mm';

but it throws an error telling me:
"Error in the format string HH:mm (missing time component)"

Am I doing something wrong here?

Chris Holland
[Team Elevate]

On 08/07/2013 19:46, Tim Young [Elevate Software] wrote:
> Chris,
>
> << Is there any way to specify formatting for a column within a grid, or
> overriding custom drawing to change the format. >>
>
> What do you mean by "formatting" ?  Do you mean the display of the text
> ? If so, then yes, you can use these events:
>
> http://www.elevatesoft.com/manual?action=viewevent&id=ewb1&comp=TDataColumn&event=OnGetText
>
> http://www.elevatesoft.com/manual?action=viewevent&id=ewb1&comp=TDataColumn&event=OnSetText
>
>
> Tim Young
> Elevate Software
> www.elevatesoft.com
Tue, Jul 9 2013 3:39 AMPermanent Link

Christian Kaufmann

>FormatSettings.ShortTimeFormat := 'HH:mm';
>
>but it throws an error telling me:
>"Error in the format string HH:mm (missing time component)"
>
>Am I doing something wrong here?

No. This is a known problem and Tim already fixed it in his dev build.
In the current build, ShortTimeFormat needs three components (e.g.
"HH:mm:ss".

cu Christian
Thu, Jul 11 2013 12:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< FormatSettings.ShortTimeFormat := 'HH:mm';

but it throws an error telling me:
"Error in the format string HH:mm (missing time component)" >>

This is fixed in 1.02 B2:

http://www.elevatesoft.com/incident?action=viewrep&category=ewb&release=1.02&incident=3858

Tim Young
Elevate Software
www.elevatesoft.com
Image