Prevalidation error in c1DateEdit

Posted by: ajmesh3 on 14 May 2024, 3:47 am EST

  • Posted 14 May 2024, 3:47 am EST

    namespace WinFormsApp;

    public partial class Form1 : Form

    {

    public Form1()

    {

    InitializeComponent();

    bs.DataSource = vm;

    dtpDate1.DataBindings.Add(“Value”, bs, nameof(SampleModel.Date1), true, DataSourceUpdateMode.OnPropertyChanged);

    dtpDate2.DataBindings.Add(“Value”, bs, nameof(SampleModel.Date2), true, DataSourceUpdateMode.OnPropertyChanged);

    }

    private SampleModel vm = new();

    private BindingSource bs = new();

    }

    public class SampleModel

    {

    public DateTime Date1 { get; set; } = DateTime.Today;

    public DateOnly Date2 { get; set; } = DateOnly.FromDateTime(DateTime.Today);

    }

    While changing date in second control. Prevalidation error appearing. How to resolve this?

  • Posted 15 May 2024, 5:51 am EST

    Hello Ajmesh,

    We have replied to your other case with ID: CAS-49523-G6W4P8. Please continue the conversastion there only to avoid any confusion.

    Regards,

    Uttkarsh.

Need extra support?

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

Learn More

Forum Channels