Gridview with edit schedule popup

7 posts, 1 answers
  1. Wim
    Wim avatar
    9 posts
    Member since:
    Aug 2012

    Posted 22 Oct 2014 Link to this post

    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.
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 24 Oct 2014 Link to this post

    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!
     
  3. Wim
    Wim avatar
    9 posts
    Member since:
    Aug 2012

    Posted 29 Oct 2014 Link to this post

    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
  4. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 31 Oct 2014 Link to this post

    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!
     
  5. Wim
    Wim avatar
    9 posts
    Member since:
    Aug 2012

    Posted 03 Nov 2014 Link to this post

    yes, you were right. The conversion to upper-case did the trick. Thanks !
  6. Wim
    Wim avatar
    9 posts
    Member since:
    Aug 2012

    Posted 21 Jan 2015 Link to this post

    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)
  7. Alexander Popov
    Admin
    Alexander Popov avatar
    1442 posts

    Posted 23 Jan 2015 Link to this post

    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!
     
Back to Top