In your Kendo UI web grid model binding just use '?' allow null in your model class property. Which property you want to use in your grid as nullable.
Model:
Kendo Grid :
UI
Model:
[Key]
public System.Guid? CompanyId { get; set; }
public System.String CompanyName { get; set; }
public System.String CompanyAddress { get; set; }
Kendo Grid :
.Columns(columns =>
{
columns.Bound(p => p.CompanyId).Hidden();
columns.Bound(p => p.CompanyName).Width(200);
columns.Bound(p => p.CompanyAddress).Width(300);
columns.Command(command => { command.Edit(); command.Destroy();}).Width(172);
})
UI
Comments
Post a Comment