
I'm trying to create a custom number format for a bound column using MVC/Grid like you see in Excel where you have a positive;negative;zero formats I keep getting errors this is what I've tried:
.ClientTemplate("#= kendo.toString(RegularTimeHours, '##,##0.00;(##,##0.00);-' ) #")
.ClientTemplate("#= kendo.toString(RegularTimeHours, '{0:##,##0.00;(##,##0.00);-}' ) #")
Could I get some direction on how to do this?
Thanks
Lee

The MultiSelect-control is bound to a list of strings and it's required that the user select exactly four items.
How can I validate that with Kendo Validator or ASP.Net Validation?
I have also tried to use the Required annotation on the model property, but only that doesn't work.
Neither do the Range-keyword since it only works for numeric fields.
HI I have asp.net mvc application with below telerik grid whcih i want to bind with asp.net webapi hosted on IIS. i can't find any ecample where to put the webapi url and how weapi's controller is invoked. please help in responding to this
@(Html.Kendo().Grid<TelerikMvcApp131.Models.DeviceDetailsChild>()
.Name("webapi_grid")
.Columns(columns =>
{
columns.Bound(p => p.person).Title("ID").Width(100);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.ToolBar(tools =>
{
tools.Create();
})
.Sortable()
.Pageable()
.Filterable()
.DataSource(dataSource =>
dataSource
.WebApi()
.Model(model =>
{
model.Id(p => p.Network);
})
.Events(events => events.Error("error_handler"))
.Read(read => read.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "product" })))
)
)
Where should i define DefaultApi inside asp.net mvc application (note DefaultApi is defined inside webapi already)
So I pass in a model list of objects into my view, I reference this in my foreign key column and use filterable.UI to link to a separate function to control the filter. But when I try to do this the grid ignore my .Filterable options and uses the data from my Model.List to populate the filter, this is not the case with a non-foreign key column.
Does anyone know how to use custom filter options with a foreign key column in a kendo grid?
Using MVC; How do I get the labels (months) to dynamically align at the bottom of the chart (see attached image) when values are negative?
I have tried:
.Labels(labels => labels.Padding(80, 0, 0, 0))but it changes the scale of my chart if there are no negative values.



I am apparently missing something in setting up a combo box, can someone help me out?
I followed the examples, and got to here:
------
public JsonResult GetItems(string filter)
{
List<Item> Items = new List<Item>();
if (!string.IsNullOrEmpty(filter))
using (ScratchDBClassesDataContext DB = new ScratchDBClassesDataContext())
Items = DB.Items.Where(itm => itm.Name.Contains(filter)).ToList();
return Json(Items, JsonRequestBehavior.AllowGet);
}
------
@(Html.Kendo().ComboBox()
.Name("ItemCombo")
.DataSource(ds =>
{
ds.Read(read =>
{
read.Action("GetItems", "Home").Data("FilterValue");
});
ds.ServerFiltering(true);
})
.DataTextField("Name")
.DataValueField("ItemID")
.AutoBind(false)
.MinLength(3)
.ClearButton(true)
)
<script>
function FilterValue() {
var ItemCombo = $("#ItemCombo").data("kendoComboBox");
return { filter: ItemCombo.text() };
}
</script>
------
It works initially - once I type 3 characters, the read action runs and my initial results are shown in the popup. However, after that, the read action never fires again when I continue typing, so the box never further filters my results.
I put a breakpoint in my controller code as well as an alert in the "FilterValue" function, and I can confirm that the action is not firing.
I discovered that if I add ".Filter(FilterType.Contains)" to the combobox configuration, the action fires every time I type after the 3rd character but my controller receives a null value for the filter string. An alert in "FilterValue" shows that ItemCombo.text() has the value I want, but it isn't being sent to the controller.
What have I missed here?