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

Dropdown in KendoGrid Issue

1 Answer 72 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
SINI
Top achievements
Rank 1
SINI asked on 30 May 2014, 07:09 AM

Hiii,

                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..

     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");

        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");

        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");

        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);       
            })      
        .Read(read => read.Action("UselogRead", "UserLog"))
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)
 









                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..
 
 
 
     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
 
        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");
 
        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");
 
        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);
           
            })
   
    
            
        .Read(read => read.Action("UselogRead", "UserLog"))
  
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)
                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..
 
 
 
     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
 
        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");
 
        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");
 
        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);
           
            })
   
    
            
        .Read(read => read.Action("UselogRead", "UserLog"))
  
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)
                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..
 
 
 
     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
 
        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");
 
        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");
 
        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);
           
            })
   
    
            
        .Read(read => read.Action("UselogRead", "UserLog"))
  
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)
                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..
 
 
 
     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
 
        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");
 
        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");
 
        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);
           
            })
   
    
            
        .Read(read => read.Action("UselogRead", "UserLog"))
  
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)
                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..
 
 
 
     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
 
        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");
 
        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");
 
        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);
           
            })
   
    
            
        .Read(read => read.Action("UselogRead", "UserLog"))
  
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)
                      Could you please help me for bind dropdown list to kendo grid.. in my case functionalities are working fine.. But there is no display for the selected item in kendo grid when loaded... After edit button click the dropdown becom visible..
 
 
 
     @(Html.Kendo().Grid(iTeamMvcKendo.Nexgen.iTeam.Library.TimeTracker.GetDaywisePunchesList(Convert.ToInt32(ViewData["UserID"]), Convert.ToDateTime(ViewData["PunchDate"])))
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.InTime)
            .HeaderHtmlAttributes(new { Style = "width:15%" })
                                              .Title("In Time")
                                            
             .Format("{0:hh:mmtt}")
            
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
        columns.Bound(p => p.OutTime)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Out Time")
                                          
                                              .Format("{0:hh:mmtt}")
                                                .EditorTemplateName("DateTime")
                                                .Width("15%");
 
        columns.Bound(p => p.TotalHours).HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Total Hours");
 
        columns.ForeignKey(p => p.ReasonID, (System.Collections.IEnumerable)ViewData["Reason"],dataFieldText: "ReasonName", dataFieldValue: "ReasonID" )
           .HeaderHtmlAttributes(new { Style = "width:15%" })
                                               .Title("Punch Out Reason").Width(160);
      
        columns.Bound(p => p.BreakHours)
              .HeaderHtmlAttributes(new { Style = "width:15%" })
                                                .Title("Break Hours");
 
        columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
    })
 
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
   
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => 
            {
                model.Id(p => p.TimeTrackerID);
                model.Field(p => p.ReasonID).DefaultValue(103);
           
            })
   
    
            
        .Read(read => read.Action("UselogRead", "UserLog"))
  
        .Update(update => update.Action("SaveUserLog", "UserLog"))
        .Destroy(update => update.Action("DeleteUserLog", "UserLog"))
    )
)

1 Answer, 1 is accepted

Sort by
0
Tourdulich
Top achievements
Rank 1
answered on 30 Dec 2014, 07:03 AM
tks forr share
Tags
AJAX and Web 2.0
Asked by
SINI
Top achievements
Rank 1
Answers by
Tourdulich
Top achievements
Rank 1
Share this question
or