Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread TGrid + Date fields
Tue, Sep 13 2016 7:28 AMPermanent Link

erickengelke

Avatar

I think Date fields in TGrids are frustrating because they don't allow empty text
like the data combo box does.  Sometimes a date doesn't exist yet.  I do a  workaround
using strings and onclick but thought maybe Tim might like to come up with a universal solution someday.

Erick
Wed, Sep 14 2016 12:52 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Erick,

<< I think Date fields in TGrids are frustrating because they don't allow empty text like the data combo box does.  Sometimes a date doesn't exist yet.  I do a  workaround using strings and onclick but thought maybe Tim might like to come up with a universal solution someday. >>

I'm not seeing that behavior here - if I use a ControlType of ctEdit or ctDateEditComboBox, both allow me to clear the contents of the column.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Sep 14 2016 6:33 PMPermanent Link

erickengelke

Avatar

Tim Young [Elevate Software] wrote:
<< I think Date fields in TGrids are frustrating because they don't allow empty text like the data combo box does.  Sometimes a date doesn't exist yet.  I do a  workaround using strings and onclick but thought maybe Tim might like to come up with a universal solution someday. >>

>I'm not seeing that behavior here - if I use a ControlType of ctEdit or ctDateEditComboBox, both allow me to clear the contents of the column.

My challenge is setting it to a clear value from the database.  I have a 'last day' for employees, ie. when they retire, and for most people that value is blank.  How do I set a blank value in my database without it being displayed as Jan 1, 1970?

Thanks,

Erick
Thu, Sep 15 2016 11:12 AMPermanent Link

Walter Matte

Tactical Business Corporation

Erick

Send NULL for dates - and the Grid will be blank.

See CreateDate, UpdateDate ....


{ "rows": [
{"DOid": 6,"Title": "Mr.","FirstName": "Walter B","MiddleInit": Null,"LastName": "Matte","Suffix": Null,"SpouseFirstName": Null,"SpouseLastName": Null,"Salutation": Null,"SalutationSpouse": Null,"Organization": "Jellyware","Position": Null,"Address1": "6 Here","Address2": Null,"City": Null,"State": "ON","Zip": Null,"HomeAreaCode": "905","HomePhone": "709-7497","BusinessAreaCode": Null,"BusinessPhone": Null,"BusinessExtension": Null,"CellAreaCode": Null,"Cell": Null,"Email": "walter@jellyware.net","Email2": Null,"EmailSpouse": Null,"Website": "www.basic.com","MailingLabelTF": False,"MailingLabel": Null,"Solicitation": 1,"Notes": "This is big time","StartDate": Null,"ExpiryDate": Null,"LastContactDate": Null,"AnnualTF": True,"DeceasedTF": Null,"MovedTF": Null,"EmailReceiptTF": Null,"NoReceiptTF": Null,"NoDonationTF": Null,"AnonymousTF": True,"CreateDate": Null,"UpdateDate": Null,"DonorType": Null,"DonorSource": Null,"DonorCategory": Null}
] }


Walter
Thu, Sep 15 2016 1:03 PMPermanent Link

erickengelke

Avatar

Walter Matte wrote:

>Erick
> Send NULL for dates - and the Grid will be blank.

Thanks, brilliant.

Erick
Image