214
Views
5
Comments
Solved
[OutSystems Data Grid] I cannot save a blank in the date column.
Question
outsystems-data-grid
Reactive icon
Forge asset by OutSystems

Hi,


I tried to change Date Column to blank, but I cannot.

(I use Data.Grid.Sample.Reactive-2.3.1_O11.oap)


How can I update the date column to blank?


1.Select CreatedOn column. 


2.Change to a Blank.


3.Return to the original value.(Can't insert a blank)




Best Regards,

Nakata


2020-08-31 15-57-57
Tiago Miguel Pereira
Staff
Solution

Hello Shohei Nakata,

I believe your question is related to this one - link.

The isRequired parameter from Wijmo is set to False for those types of columns. In order to revert this, you might need to use some Javascript.

The solution given on the other forum post is actually using a Subscribe event which is not needed since we added the OnInitialize to the Grid Block.


Can you try the following workaround:

1) Add a new client action as the handler of the OnInitialize event from the Grid Block.

2) Inside that new client action, add a JS Block with the following code:

GridAPI.GridManager.GetGridById($parameters.GridWidgetId).getColumn($parameters.ColumnWidgetId).provider.isRequired = false;


Please bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases. We are continuously working to provide more API methods, so I suggest you keep tuned, as we intend to launch new APIs that might replace the previous code.

Best regards,

Tiago Pereira

UserImage.jpg
Shohei Nakata

It works!

thank you!

2021-05-29 12-12-45
PedroMSoares

Hello, I am having the same issue. I tried your solution and it works one time then suddenly it stops appearing the DatePicker widget when I repeat the task clicking the arrow to select a date again. Do you think you know what is happening? Thanks.

UserImage.jpg
Shohei Nakata

Additional information.

If I add a space, it reverts to the original.

I want to update with a blank space.

2020-08-31 15-57-57
Tiago Miguel Pereira
Staff
Solution

Hello Shohei Nakata,

I believe your question is related to this one - link.

The isRequired parameter from Wijmo is set to False for those types of columns. In order to revert this, you might need to use some Javascript.

The solution given on the other forum post is actually using a Subscribe event which is not needed since we added the OnInitialize to the Grid Block.


Can you try the following workaround:

1) Add a new client action as the handler of the OnInitialize event from the Grid Block.

2) Inside that new client action, add a JS Block with the following code:

GridAPI.GridManager.GetGridById($parameters.GridWidgetId).getColumn($parameters.ColumnWidgetId).provider.isRequired = false;


Please bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases. We are continuously working to provide more API methods, so I suggest you keep tuned, as we intend to launch new APIs that might replace the previous code.

Best regards,

Tiago Pereira

UserImage.jpg
Shohei Nakata

It works!

thank you!

2021-05-29 12-12-45
PedroMSoares

Hello, I am having the same issue. I tried your solution and it works one time then suddenly it stops appearing the DatePicker widget when I repeat the task clicking the arrow to select a date again. Do you think you know what is happening? Thanks.

UserImage.jpg
Shohei Nakata

Thank you, Pereira.

I try it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.