This question is locked. New answers and comments are not allowed.
I need some guidance in binding a grid to my view model.
I have a model and view model that look like
I am binding my grid to my viewmodel
How can I bind the columns to not only show CardNumber but all of the other properties contained in the list?
Any help would be great.
Thank you
I have a model and view model that look like
public class CardTransactionModel { public int CardTransactionId { get; set; } public Guid UserId { get; set; } public decimal Amount { get; set; } public DateTime TransactionDate { get; set; } public int CardPaymentId { get; set; } } public class CardTransactionPaymentViewModel { public string CardNumber { get; set; } public List<CardTransactionModel> CardTransactionModel { get; set; } }I am binding my grid to my viewmodel
@{Html.Telerik().Grid(Model) .Name("Grid") .Selectable() .Columns(columns => { columns.Bound(o => o.CardNumber); }) .DataKeys(keys => { keys.Add(p => p.CardNumber); }) .Scrollable() .Sortable() .Pageable() .Filterable() .Footer(true) .Render();}How can I bind the columns to not only show CardNumber but all of the other properties contained in the list?
Any help would be great.
Thank you