Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys

i want to update my kendo grid with popup template but datetimepickerfor returns null value

I need your expert advise to resolved the issue.

Please help me out.

Thanks,
Muzzi ELGÜN


My Controller :
C#
[AcceptVerbs(HttpVerbs.Post)]
      public ActionResult taskList_read([DataSourceRequest] DataSourceRequest request)
      {
          IQueryable<requestTaskModel> products = from pro in db.requestDetailTaskViews
                                                  select new requestTaskModel() { START = pro.Start, END = pro.End, TASKID = pro.task_id };

          return Json(products.ToDataSourceResult(request));
      }

      [AcceptVerbs(HttpVerbs.Post)]
      public ActionResult EditingPopup_Create([DataSourceRequest] DataSourceRequest request, requestTaskModel product)
      {
          return View();
      }



My Grid

HTML
@(Html.Kendo().Grid<talasBim.Models.requestTaskModel>()
            .Name("Grid").Editable(editable => editable.Mode(GridEditMode.InCell))
            .Columns(columns =>
            {
            columns.Bound(q => q.TASKID).Title("Talep No");
            columns.Bound(q => q.START).Title("Başlangıç");
            columns.Bound(q => q.END).Title("Bitiş");
          
                columns.Command(command => { command.Edit().Text("Planla").UpdateText("Tarihleri Kaydet"); }).Width(200);
            }).Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("rplanETemp").Window(w => w.Width(500).Height(250))).Pageable()
    .Sortable()
    .Filterable()
            .DataSource(dataSource => dataSource
                .Ajax()
             
                .PageSize(5)
           .Read(read => read.Action("taskList_read", "FEN"))
           .Update(update => update.Action("EditingPopup_Create", "FEN"))
           .Destroy(update => update.Action("tasklist_delete", "TASK"))
           .Model(model =>
           {
               model.Id(p => p.TASKID);
             
               

           })

     ).Sortable().Filterable()
)



My Template

HTML
@model talasBim.Models.requestTaskModel


@(Html.Kendo().DatePickerFor(model => model.START).Name("STARTDTP").Format("yyyy-MM-dd")

//The name of the datepicker is mandatory. It specifies the "id" attribute of the widget.
.Value(DateTime.Today) //Set the value of the datepicker
             .Start(CalendarView.Year))


@(Html.Kendo().DateTimePickerFor(d => d.END).Format("yyyy-MM-dd").Name("ENDDTP")
.Value(DateTime.Today) //Set the value of the datepicker
             .Start(CalendarView.Year))


@(Html.Kendo().TextBoxFor(d => d.TASKID))
@*@(Html.Kendo().DropDownListFor(d => d.suggested_pool)
    .Name("suggested_pool")
    .BindTo(ViewData["destinationPools"] as IEnumerable<SelectListItem>)
              )*@





<script type="text/javascript">
    kendo.culture("de-DE");

</script>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900