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

[Solved] datepicker not showing up

0 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hetal
Top achievements
Rank 1
Hetal asked on 26 Jun 2012, 01:40 PM
Hello
I have MVC project using telerik grid.

My Index.cshtml is as follows

@{
    ViewBag.Title = "Index";
}
 
<h2>Index</h2>
@(Html.Telerik().Grid<Dadavani_5_Telerik.Models.Dad_Membership>()
.Name("Membership")
.Columns(col =>
       {
           col.Bound(r => r.PERSON_ID);
           col.Bound(r => r.MEMBER_TYPE);
           col.Bound(r => r.ADDRESS_ID);
           col.Bound(r => r.D_CURRENCY_CODE);
           col.Bound(r => r.SUBSCRIPTION_DATE);
           col.Bound(r => r.END_DATE);
           col.Bound(r => r.DISCOUNT_YN);
           col.Bound(r => r.AMOUNT);
           col.Bound(r => r.D_STATUS_CODE);
           col.Bound(r => r.BILL_NO);
           col.Bound(r => r.PRINT_YN);
           col.Bound(r => r.DUPLICATE_YN);
           col.Bound(r => r.PAYMENT_CODE);
           col.Bound(r => r.CREATED_BY).ReadOnly(true);
           col.Bound(r => r.CREATED_DATE).Format("{0:dd/MM/yyyy hh:mm:ss tt}").ReadOnly(true);
           col.Command(cmd => cmd.Edit().ButtonType(GridButtonType.ImageAndText));
           col.Command(cmd => cmd.Delete().ButtonType(GridButtonType.ImageAndText));
       })
        .ToolBar(commands =>
        {
            commands.Insert().ButtonType(GridButtonType.ImageAndText);
        })
        .DataKeys(keys => keys.Add(mkey => mkey.MEMBER_ID).RouteKey("mid"))
        .DataBinding(dataBinding => dataBinding.Ajax()
        .Select("Select_Memberships", "Membership")
        .Insert("Insert_Memberships", "Membership")
        .Update("Update_Memberships", "Membership")
        .Delete("Delete_Memberships", "Membership")
         
        )
            .Pageable(paging => paging.PageSize(20))
            .Sortable()
            .Filterable()
             
)        
    

Controller for the same is as follows:
public ActionResult Index()
        {
           return View(new GridModel(context.Memberships));
        }
 
 
        [GridAction]
        public ActionResult Select_Memberships()
        {
            return View(new GridModel(context.Memberships));
             
        }

Also in ~/views/shared/EditorTemplates/ folder I have Date.cshtml as follows

@model DateTime?
 
@(Html.Telerik().DatePickerFor(m => m)
      .HtmlAttributes(new { id = ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty) + "_wrapper" })
)

What else is missing? Why it is not showing date picker in edit mode?
Tags
Grid
Asked by
Hetal
Top achievements
Rank 1
Share this question
or