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

Grid inline editing

0 Answers 206 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 19 Oct 2012, 08:31 AM
I have the following inline grid with datepicker. The datepicker bind date corretly in database. However if you change the radpicker value then it would not hold the current selected date instead it hold 01/01/1001 00 00 00. 

Anybody can help?

VIEW:


@(Html.Kendo().Grid(Model)
    .Name("SList")
        .HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
    .Columns(columns => {
        columns.Bound(p => p.CCID);
        columns.Bound(p => p.CRN);
        columns.Bound(p => p.CFirstName).Width(140);
        columns.Bound(p => p.CFamilyName).Width(140);
        columns.Bound(p => p.Alias).Width(45);
        columns.Bound(p => p.CGender).Width(45);
        columns.Bound(p => p.CAge).Width(45);
        columns.Bound(p => p.CDOB).Format("{0:MM/dd/yyyy}");
        columns.Bound(p => p.RDate).Format("{0:MM/dd/yyyy}");
        columns.Bound(p => p.RFrom);
        columns.Bound(p => p.RComments);
        columns.Bound(p => p.ReferralTo);
        columns.Bound(p => p.CStatusID).EditorTemplateName("CStatus
");
        columns.Bound(p => p.DateScheduled).Format("{0:MM/dd/yyyy}");
  
        columns.Command(commands => commands.Edit()).Width(175);
    })
    //.ToolBar(toolBar => toolBar.Save())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .Scrollable()
    .Navigatable()
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
                                        .Type(GridSelectionType.Row))
    .DataSource(dataSource => dataSource        
        .Ajax()
        .PageSize(10)   
        .Model(model => model.Id(p => p.ConsumerID))
        .Read(read => read.Action("Index", "Management"))
        .Update(update => update.Action("Edit", "Management"))
      
    )
)

/Shared/EditorTemplates
DateTime.cshtml

@model DateTime?

@(Html.Kendo().DatePickerFor(m => m)
              .Format("M/dd/yyyy"))
              

No answers yet. Maybe you can help?

Tags
Date/Time Pickers
Asked by
Mark
Top achievements
Rank 1
Share this question
or