This question is locked. New answers and comments are not allowed.
Hi
I am having issues where a combo box column is not displaying the selected value when in display mode. It just shows [Object object]. Also if I edit the row, the column is not remembering the selected item. The "GST Code" column is the problem column
I have my display template and edit templates all defined
Below is my code for the grid:
I am having issues where a combo box column is not displaying the selected value when in display mode. It just shows [Object object]. Also if I edit the row, the column is not remembering the selected item. The "GST Code" column is the problem column
I have my display template and edit templates all defined
Below is my code for the grid:
<%= Html.Telerik()
.Grid(Model.InvoiceLineItems)
.Name("InvoiceLineItemGrid")
.DataKeys(keys =>
{
keys.Add(i => i.StagingId).RouteKey("StagingId");
})
.ToolBar(commands => commands.Insert())
.DataBinding(dataBinding =>
{
dataBinding.Ajax()
.Select("GetEnteredInvoiceLineItems", "SupplierInvoice")
.Insert("InsertLineItem", "SupplierInvoice")
.Update("EditLineItem", "SupplierInvoice");
})
.Columns(columns =>
{
columns.Bound(i => i.TaxCode).Title("GST Code");
columns.Bound(i => i.UnitCost.Tax).Title("GST");
columns.Bound(i => i.UnitDescription).Title("Unit Description");
columns.Command(commands => { commands.Edit(); }).Width(150).Title("Actions");
})
.ClientEvents(events => events
.OnRowDataBound("InvoiceLineItemGrid_OnRowDataBound"))
.Scrollable()
%>
Below is my code for display template:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<
ViewModels.Portal.TaxCodeViewModel
>" %>
<%= Html.Encode(Model.Code) %>