[Data Grid Web] Initial value of GridColumnDateTime of DataGrid
Forge component by OutSystems R&D

Hi Everyone,

I am editing the date and time using GridColumnDateTime of DataGrid.

The system date is set automatically when I move the cursor to the target column, but I want to prevent it from being set.


Hello Yuichiro Tada,

Could you please give us an example so that we can examine and try to give you the best option according to your needs?

Thank you,

Tiago Pereira

Hi Yuichiro Tada,

You can set value for datetime on OnInitialize event so its show that datetime which you was set.
By using this approach you can set value or show form entity.


Rahul Jain


Thank you for your answer.

But it seems a little different from what I want to do.

When I cursor in, today's date is set by default.

What I want to do is make sure that nothing is set when the cursor is in.

Can you see the attached file?


Hello Yuichiro Tada,

Thank you for the explanation.

We are currently setting the current date for the clicked DateTime cells.
We are going to analyze your request and let you know as soon as we have a solution.

Thank you

Hello Yuichiro Tada,

Thanks for bringing this subject to the discussion.

DataGrid component is currently using a handler to set the default value on double click equal to the current date for Date columns.

Nevertheless, I created a sample just to illustrate how you can accomplish that specific behavior, could you please check the sample attached to this message?

As a workaround, you can use the sample as an example. You will need to include a Web Block containing the method that you want to set a new handler for the Dates. (This block is included in the sample attached)

Inside the Web Block you can see that we have a Javascript block containing a setTimeout. We need to wait for the grid to load the group panel otherwise, we will get an error. Feel free to create your own method.

Hope this sample is useful if you need to extend DataGrid to remove the default value on double click for Date columns.

Tiago Pereira


Thank you for providing me with a sample.

I confirmed the operation, but it seems that today's date is set as the default date by double-clicking.

-> newCellEditionMethod has not been called.

How can I make the value unset specifically?

Hello Yuichiro Tada,

Could you please send us the sample you are using, so we can see what's going on?

Thank you,

Gabriel Lundgren


I took some time to reply.

The event handler prepareCellForEdit does not occur.

Therefore, the value value cannot be initialized.

Is it possible to implement in events other than prepareCellForEdit?

Hello @Yuichiro Tada 

Can you please let me know if this forum post is the one where you are trying to use the prepareCellForEdit event?



Bruno Martinho

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