I'm trying to have a group of 2 radio buttons (each button in different
column but the same row) in my Kendo grid popup template but without success. I defined the type of the parameter as a string. But after clicking the radio button, it will set it to null type.
It works fine
with checkboxes, though
<div class="editor-field">
@Html.RadioButtonFor(model => model.Status, "Avail")Available
@Html.RadioButtonFor(model => model.Status, "Not Avail") Not Available
</div>
when I debuged, model.Status = null, every time.
Tue Mar 19 2013 00:00:00 GMT-0700 (Pacific Daylight Time)". This value does not automatically populate the view model on submission and the date property on the model defaults to DateTime.MinValue. Since this is an identical view model with and identical editor template, does anyone have any ideas on why the POST values are different (and seemingly improperly formatted from the grid)?
|
I'm working through some Kendo UI tutorials and have a problem with the look of my text boxes on the grid. The demo I'm following is http://demos.kendoui.com/web/grid/editing-inline.html.
I've figured out how to format the date in the grid and use a datepicker for the date in the editor. To do this I've used an Editor template.
I've added an editor template for the name column just so I could apply a css class and it looks better but it doesn't function correctly. When the editor opens up the value in the text box is empty (see image). Surely there must be an easier way to apply a css class.
Do I have to create an editor template for all text boxes in the grid? If so, how can I have it bring the value when editing?
Here's the code for the grid:
@(Html.Kendo().Grid<Product>()
.Name("Grid")
.Columns(columns => {
columns.Bound(p => p.Name);
columns.Bound(p => p.UnitPrice).Width(140);
columns.Bound(p => p.Units).Width(140);
columns.Bound(p => p.Discontinued).Width(100);
columns.Bound(p => p.Date).Width(100).Format("{0:d/M/yyyy}");
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.Id))
.Create(update => update.Action("EditingInline_Create", "Home"))
.Read(read => read.Action("EditingInline_Read", "Home"))
.Update(update => update.Action("EditingInline_Update", "Grid"))
.Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
)
Here's the code for the name editor template:
@using Kendo.Mvc.UI
@model KendoUiOne.Models.Product
@Html.TextBoxFor(x=>x.Name, new {@class = "k-input k-textbox"})
I'm new to Telerik and Kendo UI. We have a commercial license.
Please can you point me to a Kendo sample project for PanelBar that displays data from a Data context (using EF). Is it possible to do inline editing in a Panel Bar like in a Grid (KendoGridMvcCodeFirst sample project)?
Annie