This question is locked. New answers and comments are not allowed.
I have a grid with a bound column that is a short data type and in order for it to show up I have to explicitly set the visibility to true. Any ideas why this one column operates differently than the others?
@(Html.Telerik().Grid<
AdminTrainingViewModel
>()
.EnableCustomBinding(true)
.Name(string.Format("{0}Grid", Model))
.DataBinding(x =>
{
x.Ajax().Select("GetGridData", "AdminTraining");
x.Ajax().Update("Deny", "AdminTraining");
x.Ajax().Delete("Approve", "AdminTraining");
}
)
.Columns(x =>
{
x.Bound(y => y.FullName);
x.Bound(y => y.TrainingStatusId).Visible(true);
x.Bound(y => y.RepCategoryName);
x.Bound(y => y.TrainingDate).Format("{0:MM/dd/yyyy}").Width(100);
x.Bound(y => y.Activity);
x.Bound(y => y.Purpose);
x.Bound(y => y.NumOfHours).Format("{0:#,##0.00}").Width(60);
x.Command(y => y
.Custom("Approve")
.Ajax(true)
.Action("Approve", "AdminTraining")
.DataRouteValues(z => z.Add(m => m.TrainingId).RouteKey("trainingId"))
.ButtonType(GridButtonType.Image)
).Visible(Model != TrainingStatus.Approved).Width(50);
x.Command(y => y.Edit().ButtonType(GridButtonType.Image)).Visible(Model != TrainingStatus.Denied).Width(50);
}
)
.Editable(x => x.Mode(GridEditMode.PopUp))
.DataKeys(x => x.Add(y => y.TrainingId))
.Pageable(x =>
{
x.PageSize(20);
x.Style(GridPagerStyles.Status);
x.PageOnScroll(true);
})
.Sortable(x => x.OrderBy(y => y.Add(z => z.UpdateDate).Descending()))
.ClientEvents(x => x.OnComplete("AdminTrainingGrid_OnComplete"))
.ClientEvents(x => x.OnEdit("AdminTrainingGrid_OnEdit"))
)