RecurrenceEditorFor

3 Answers 32 Views
Scheduler
Frank
Top achievements
Rank 1
Iron
Iron
Frank asked on 09 Sep 2021, 05:04 PM

Hi,

I'm using RecurrenceEditorFor without scheduler. How can I get values ReccurenceRule and RecurrenceID  and pass to controller?

@(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
?
?


Regards
Frank

3 Answers, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
Iron
Iron
answered on 10 Sep 2021, 09:57 AM
Maybe I wasn't too precise ;). In the schedule, when I add an event in the console, in the browser, I can see that all the values from the form are transferred. When I put ReccurenceEditorFor in another form in a different view, not all values are sent, e.g. RecurrenceRule, RecurrenceID etc. are missing. but there is End. Whether the problem is in misuse or you cannot use ReccurenceEditorFor off-schedule.

Thanks

Regards
Frank
0
Eyup
Telerik team
answered on 14 Sep 2021, 08:56 AM

Hello Frank,

 

Thank you for writing to us.

I am afraid it is difficult to figure out your exact configuration without the actual code. Could you open a formal support ticket where you can send us a very basic isolated version of your app so we can provide better insights?

 

Regards,
Eyup
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.

0
Frank
Top achievements
Rank 1
Iron
Iron
answered on 14 Sep 2021, 07:06 PM | edited on 14 Sep 2021, 07:06 PM

Hi Eyup,

my View:


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })

    <div class="form-horizontal">
        <div class="form-group row">
            <div class="form-group col-lg-7">
                <div class="form-horizontal">
                    <div class="form-group row">
                        <span class="col-sm-2 col-form-label"> Item name</span>
                        <div class="col-sm-10">
                            @Html.Kendo().TextBoxFor(model => model.Item).HtmlAttributes(new { @class = "form-control", @style = "width: 100%" })
                            @Html.ValidationMessageFor(model => model.Item, "", new { @class = "text-danger" })

                        </div>
                    </div>

                    <div class="form-group row">
                        <span class="col-sm-2 col-form-label"> Color </span>
                        <div class="col-sm-10">
                            @Html.Kendo().ColorPickerFor(model => model.Color).HtmlAttributes(new { @class = "form-control", @style = "width: 100%" })
                            @Html.ValidationMessageFor(model => model.Color, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group row">
                        <span class="col-sm-2 col-form-label"> Qty</span>
                        <div class="col-sm-10">
                            @Html.Kendo().TextBoxFor(model => model.Qty).HtmlAttributes(new { @class = "form-control", @style = "width: 100%" })
                            @Html.ValidationMessageFor(model => model.Qty, "", new { @class = "text-danger" })
                        </div>
                    </div>
                    <div class="form-group row">
                        <span class="col-sm-2 col-form-label"> RecurrenceRule"</span>
                        <div class="col-sm-10">
                            @Html.LabelFor(model => model.RecurrenceRule, "Repeat Event", new { @class = "control-label input-sm" })
                            <div data-container-for="recurrenceRule" class="k-edit-field">
                                @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
        .HtmlAttributes(new { data_bind = "value:recurrenceRule", name = "recurrenceRule", data_role = "recurrenceeditor" }))
                                @Html.ValidationMessageFor(model => model.RecurrenceRule)
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-12">
                        <input type="submit" value="@LocalizerGlobal["CREATE"]" class="btn btn-primary" /> @Html.ActionLink(LocalizerGlobal["BACK"], "Index")
                    </div>
                </div>
            </div>
        </div>
    </div>

}
When I click the create button in the console in the browser I can see the values of all controls, i.e. item, color, qty except the values from the ReccurenceEditorFor control.

Regards
Frank
Eyup
Telerik team
commented on 17 Sep 2021, 11:59 AM

Hi Frank,

I am afraid RecurrenceEditorFor is implemented only within the context of a Scheduler component. More specifically, Custom Editor Template for Scheduler:

https://github.com/telerik/ui-for-aspnet-mvc-examples/blob/master/scheduler/scheduler-drag-and-drop/SchedulerCustomEditor/Views/Home/EditorTemplates/CustomEditorTemplate.cshtml

You can log this enhancement idea of using RecurrenceRule without Scheduler in our Public Feedback portal so it can gain better traction:
https://feedback.telerik.com/aspnet-mvc

I am sorry I cannot provide much guidance here. Let me know if I can assist with anything else related to Scheduler.

Tags
Scheduler
Asked by
Frank
Top achievements
Rank 1
Iron
Iron
Answers by
Frank
Top achievements
Rank 1
Iron
Iron
Eyup
Telerik team
Share this question
or