Page 1 of 1

Windows grid hide a date field with value 1900-01-01

Posted: Wed Sep 13, 2023 12:36 am
by atostaine
I have a date(10) field defined as a column in my grid. What's the best way to hide the value of 1900-01-01?

I've been fooling with grid.currentitem.cell but haven't had any success.

Thanks, art

Re: Windows grid hide a date field with value 1900-01-01

Posted: Thu Sep 14, 2023 12:03 am
by Jurgen.Rentinck
Hi Art,

Try to set the value to *SQLNULL before you add the entry to the list.

Code: Select all

* this should result in an empty cell
#datex := *SQLNULL
Add_Entry To_List(#Grid1)
* this should result in an cell containing 01-01-1900
#datex := *NULL
Add_Entry To_List(#Grid1)

Re: Windows grid hide a date field with value 1900-01-01

Posted: Thu Sep 14, 2023 1:11 am
by atostaine
Thanks I don’t think that was working for me. Let me try again.

Re: Windows grid hide a date field with value 1900-01-01

Posted: Thu Sep 14, 2023 1:20 am
by atostaine
Thanks I don’t think that was working for me. Let me try again.

Re: Windows grid hide a date field with value 1900-01-01

Posted: Thu Sep 14, 2023 3:22 am
by atostaine
Our field was imported from IBM i and SQLNull wasn't an allowed output attribute. LANSA won't let me add an attribute to an imported field. I made a new field and all works good.

Thanks