C1FlexGrid, clear date in a cell

Posted by: eliseu on 9 November 2022, 3:59 pm EST

    • Post Options:
    • Link

    Posted 9 November 2022, 3:59 pm EST - Updated 9 November 2022, 4:04 pm EST

    When I select a cell, automatically set a date (today), but I don’t want it.

    I want that set a date just after a user select the date and option to clear the selected date.

    Thanks a lot.

    My form in attachments

  • Posted 10 November 2022, 2:43 am EST

    Hello Eliseu,

    The default editor for the DateTime column is MS DateTimePicker and it is the default behavior of the DateTimePicker.

    To achieve your requirement you can use the C1DateEdit controls as the Editor of the DateTime column.

    c1DateEdit1.EmptyAsNull = true;
    c1DateEdit1.NullText = "";
    c1FlexGrid1.Cols[dateTimeColumnIndex].Editor = c1DateEdit1;

    Please find the attached sample implementing the same.

    Regards,

    Prabhat Sharma.

    DateTimeColumnFlexGrid_Demo.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels