DateEdit strange thing

Posted by: moreno.andreini on 27 November 2023, 5:52 am EST

  • Posted 27 November 2023, 5:52 am EST

    I have a solution in visual studio 2022 with net framework 4.81 in windows form. For a mask I use Bindingsource. I have date fields matched to the dataset. When I load the data (as soon as I open the form) the controls are filled with the values ​​of the dataset. If I use DateTimePicker and query the values ​​of the controls they contain the values ​​of the dataset. If I use c1DatetimeEdit I see the values ​​in the fields, but if I query the value property of the controls they do not report values, but this only happens for dates, the other controls work. If I then perform some operation, such as search or move forward or backward, then if I query the controls they are enhanced. But this only happens if in the code I query the value property, because the control reports the correct values. I don’t understand why this behavior is so strange. The version is the latest available and I use 4.8

  • Posted 28 November 2023, 8:46 am EST

    Hi Moreno,

    It seems like you have created a duplicate case. We have already replied to your query on the support case (CAS-45427-Q0N7L9). You can go to the My Account > My Support section of your Mescius account and you will find the case there. We request you to continue the thread there only to avoid confusion.

    Best Regards,

    Kartik

  • Posted 29 November 2023, 4:47 am EST

    Hi Kartik, I solved the problem (at least I think), although I solved the problem empirically. I have been using your products for a long time, even when they were called Apex True DBGrid, wow!

    The scenario is this: Windows form with a Tab Control with three tabs. In the first tab there are some controls of various types (TextBox, CheckBox and numeric), in the second tab there are some DateTime controls. For this Form I use TableAdapter and BindingSource. The error appeared immediately after loading the form and doing FillRecord() and then saving the record, without making any changes. In this phase the error was generated but only if I put c1DateTimeEdit on the DateTime controls. I checked from code that the values ​​were consistent but these were empty. If instead I used DateTimePicker, the standard, this didn’t happen. But I couldn’t use that control because I also needed null values ​​and that control doesn’t allow you to do this. I realized by chance, after wasted hours of work, that if I went to tab 2 before saving and then went back to tab 1, the error didn’t occur. So I solved it like this, I load the form and from code I go to tab2 and immediately to tab1. That’s how it works, but I think it’s a bug in c1DateTimeEdit.

    Greetings

  • Posted 3 December 2023, 10:46 pm EST

    Hi Moreno,

    Thanks for your reply. We have replied to your response in the support case and we request you please continue the thread their only to avoid confusion.

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels