Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Enum

C#
public class Voltage
  {
      public int Id{ get; set; }
      public string RefNo { get; set; }
      public VoltageLevel VoltageLevel { get; set; }

  }
  public enum VoltageLevel
  {
      LV = 1,
      MV = 2,
      HV = 3
  }


Controller

C#
public ActionResult Voltage_Read([DataSourceRequest]DataSourceRequest request)
     {
         IQueryable<Voltage> voltage= db.Voltage;
         DataSourceResult result = voltage.ToDataSourceResult(request, voltage=> new {
             Id = voltage.Id,
             RefNo = voltage.RefNo,
             VoltageLevel = voltage.VoltageLevel,

         });

         return Json(result);
     }


View

@(Html.Kendo().Grid<entities.voltage>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.RefNo);
columns.Bound(c => c.VoltageLevel); //here the voltagelevel didnt show.
})

What I have tried:

C#
columns.Bound(c => c.VoltageLevel); //here the voltagelevel didnt show.
Posted
Comments
Suvendu Shekhar Giri 6-Dec-16 3:39am    
Shoot your question to Forum threads about Grid Kendo UI[^]
wa.war 6-Dec-16 21:26pm    
they didnt answer my question anyway.

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