Winform Radscheduler dadabinding meet 'System.Data.NoNullAllowedException' issue

3 Answers 138 Views
Scheduler and Reminder
Mike
Top achievements
Rank 1
Iron
Iron
Mike asked on 07 Feb 2022, 10:57 AM

Hi guys,

 

When I am doing data binding on RadScheduler(using SchedulerBindingDataSource), I meet  'System.Data.NoNullAllowedException, Column 'id' does not allow null'

My steps are:

1) Double-Click on the scheduler to create a new time slot, and custom appointment dialog show up.

2) type the info, then click ok button

3) error shows....

4) After clicking ok button, the appointment slot will show on schedule, then click the Save button, data will be saved to the database

 

However, The data populating is good. I can receive data from the database, when I run the application the data which I manually type into the database is exist on schedule. And if I click on exist appointment slot and do some changes,  there is no error. After I click save button The data will be successfully saved into the database.

 

Could you let me know which part will be the issue, All screenshots are attached.

If need more information, plz let me know,

 

Thanks,

Mike

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 10 Feb 2022, 07:57 AM

Hi Mike,

Thank you for the provided images.

Upon checking our feedback portal, I found that we had a similar exception logged in our Feedback Portal when an appointment is created. The issue is related to a database having fields not allowing null. This exception is already addressed. The fix was introduced a few years back so may I ask you to share which version of our controls are you using? Also, can you try the workaround mentioned in the feedback item: Workaround: remove the database restrictions and validate the data in the edit dialog before submitting the new appointment data. and let me know if it makes any difference.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Mike
Top achievements
Rank 1
Iron
Iron
answered on 10 Feb 2022, 05:41 PM

Hi Dinko,

 

Thanks for the quick reply.

The 'id' is the primary key of this table, So It must not allow nulls.

And my version of Telerik Winform is 2021.2.615

 

Regards,

Mike

Mike
Top achievements
Rank 1
Iron
Iron
commented on 11 Feb 2022, 06:51 AM

Also here in the introduction of RAdscheduler data binding article. The set ID (primary key) doesn't allow null

 

Link: https://www.telerik.com/blogs/data-binding-with-radscheduler-for-winforms?-ga=2.204391824.1060152126.1644126000-451845574.1638143444&-gac=1.82139236.1641417169.Cj0KCQiAoNWOBhCwARIsAAiHnEg9jvTcQLokuxqr8E-l7EbWimKHMxub-v-eAIvZNrDQEaVPiL4tVGMaAuH4EALw-wcB

0
Dinko | Tech Support Engineer
Telerik team
answered on 14 Feb 2022, 09:56 AM

Hello Mike,

The problem back then was related to a field that is not primary and does not allow null values. Using only the provided information I could only guess what is the reason behind this exception. It could be a corner case in which the fix is not working correctly. Could it be possible to isolate this behavior in a standalone project with less code as possible? This way I can attach the source code on my side and debug the exception. 

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Scheduler and Reminder
Asked by
Mike
Top achievements
Rank 1
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Mike
Top achievements
Rank 1
Iron
Iron
Share this question
or