This question is locked. New answers and comments are not allowed.
Hello
I use MVC 3.0..0 (run-time version v4.0.30319)
here is code for form
here is model
here is code for grid
here is controller
grid of news displayed http://clip2net.com/s/1piih
date is displayed correctly
but when i go in edit mode - look - http://clip2net.com/s/1pijs
time part is not shown
What should I do ?
Thanks
I use MVC 3.0..0 (run-time version v4.0.30319)
here is code for form
@{ Html.Telerik().EditorFor(m => m.FullDescription) .Name("FullDescription") .HtmlAttributes(new { style="width:100%;height:400px;position" }) .Encode(false) .Render(); } @(Html.LabelFor(m => m.Description)) @(Html.TextBoxFor(m => m.Description, new { style="width:400px;position:relative" }))@(Html.LabelFor(m => m.Date))@(Html.EditorFor(m=>m.Date))here is model
using System;using System.Collections.Generic;using System.ComponentModel;using System.ComponentModel.DataAnnotations;using System.Linq;using System.Text;using System.Web.Mvc;namespace VCustoms.Business{ public class News { #region Mapped [Key] public int NewsID { get; set; } [DisplayName("Название")] public string Description { get; set; } [DisplayName("Значение")] [AllowHtml] [DataType(DataType.MultilineText)] public string FullDescription { get; set; } [DisplayName("Дата")] [DataType(DataType.DateTime)] public DateTime Date { get; set; } #endregion }}here is code for grid
@{ ViewBag.Title = "Новости";}@(Html.Telerik().Grid<VCustoms.Business.News>() .Name("News") .DataBinding(dataBinding => { dataBinding.Ajax() .Update("Update", "News") .Select("Select", "News") .Delete("Delete", "News") .Insert("Insert", "News"); } ) .DataKeys(keys => { keys.Add(n => n.NewsID).RouteKey("NewsID"); }) .Columns(columns => { columns.Bound(b => b.FullDescription); columns.Bound(b => b.Description); columns.Bound(b => b.Date); columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Text); commands.Delete().ButtonType(GridButtonType.Text); }).Width(180).Title(""); }) .ToolBar(commands => { commands.Insert().ButtonType(GridButtonType.Text).ImageHtmlAttributes(new { style = "margin-left:0" }); }) .Editable(editing => editing.Mode(GridEditMode.InForm) ) )[AcceptVerbs(HttpVerbs.Post)][GridAction]public ActionResult Select(){ using (Db db = new Db()) { return View(new GridModel(db.News.ToList<News>())); }}grid of news displayed http://clip2net.com/s/1piih
date is displayed correctly
but when i go in edit mode - look - http://clip2net.com/s/1pijs
time part is not shown
What should I do ?
Thanks