This is a migrated thread and some comments may be shown as answers.

Gridview with edit schedule popup

6 Answers 95 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Wim
Top achievements
Rank 1
Wim asked on 22 Oct 2014, 01:51 PM
Hi,

I have successfully implemented the Scheduler in an application with the use of the online examples. After running it for a few weeks, the customer requested a new overview of all scheduler events.

Therefore I have created a simple Kendo gridview that lists all user events, with a toolbar that contains the CRUD commands.
When the user clicks the edit button, a popup appears and the same (custom) schedule edit screen from the schedule page is shown. However, if the user clicks the save/update button, the recurrencerule property from the object is always null when sent to the server. All other properties are filled in.

Since I'm reusing my customeditortemplate I thought it would work without modification, but it appears I'm missing something.

6 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 24 Oct 2014, 08:05 AM
Hi Wim,

I tried to reproduce the problem locally but to no avail – everything is working as expected on our side (as seen in this screencast). Could you please provide runable project where the issue is reproduced? This would help us pinpoint the exact reason for this behavior.


Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Wim
Top achievements
Rank 1
answered on 29 Oct 2014, 02:14 PM
I'm including the 3 components affected, instead of the complete solution.

I've recreated the page from scratch again, and it seems that only the event category and event type is posted back to the server.
All other fields are default values or NULL, in the case of the start and end dates, they default to DateTime.Now() for some reason.

I hope you can help me out here
0
Accepted
Vladimir Iliev
Telerik team
answered on 31 Oct 2014, 10:13 AM
Hi Wim,


From the provided information it seems that the issue most probably is related to the field name specified in the "data_bind" option (the field name should start with lower-case letter only in the Scheduler) - it should be typed as-is as the Grid doesn't translate the fields from "ISchedulerEvent" interface to start with lowercase letter:

<div data-container-for="recurrenceRule" class="k-edit-field">
    @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
        .HtmlAttributes(new { data_bind = "value:RecurrenceRule" }))
</div>

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Wim
Top achievements
Rank 1
answered on 03 Nov 2014, 08:13 AM
yes, you were right. The conversion to upper-case did the trick. Thanks !
0
Wim
Top achievements
Rank 1
answered on 21 Jan 2015, 09:06 AM
While the postback contains all properties now, I'm still facing a validation problem on the dates.
The date compare validation doesn't work, the user is able to select an end-date that is before the start date.

The required field validation does work on all fields.

This only occurs in the grid popup edit, not in the scheduler edit. (same custom editor template)
0
Alexander Popov
Telerik team
answered on 23 Jan 2015, 09:45 AM
Hi Wim, 

In the current case I would recommend specifying custom validation rules in the Grid's DataSource schema.model option.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Wim
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Wim
Top achievements
Rank 1
Alexander Popov
Telerik team
Share this question
or