function parameterEditor(container, options) {
switch (options.model.ObjectFieldTypeID) {
case @((int)ObjectFieldType.Types.Boolean):
boolEditor(container, options);
break;
case @((int)ObjectFieldType.Types.Integer):
numericEditor(container, options, 0);
break;
case @((int)ObjectFieldType.Types.Double):
numericEditor(container, options, 2);
break;
case @((int)ObjectFieldType.Types.DateTime):
dateTimeEditor(container, options, "kendoDateTimePicker", "M/d/yyyy H:mm", "H:mm");
break;
case @((int)ObjectFieldType.Types.Date):
dateTimeEditor(container, options, "kendoDatePicker", "M/d/yyyy");
break;
case @((int)ObjectFieldType.Types.Time):
dateTimeEditor(container, options, "kendoTimePicker", "H:mm");
break;
default:
stringEditor(container, options);
}
}
function dateTimeEditor(container, options, type, format, timeFormat) {
$('<input id=' + options.field + '>')
.appendTo(container)[type]({ /* dynamically choose the type of kendoXXXPicker (code other than "format" is universal) */
value: options.model.DefaultValue,
format: format,
timeFormat: timeFormat,
})
.data(type);
$("#" + options.field).on("change", function () {
options.model.set(options.field, kendo.toString($(this).val(), format) || $(this).val());
});
}

This example not works as expected:
https://dojo.telerik.com/ESAQEsip/2
It should only select: Red and Green.
Isn't it?
It's the same if I write the value of the input field by hand: value="Red"
Docs:
https://docs.telerik.com/kendo-ui/framework/mvvm/bindings/checked#binding-lists-of-checkboxes-to-arrays
Many thanks
Using the demo (https://docs.telerik.com/kendo-ui/knowledge-base/timeline-using-range-bars) as a base, each has a unique ID. I have adjusted the data in the datasource to only use two different colors. The demo turns off the legend. But I need a legend to indicate what the colors on my chart mean. Turning on the legend (for both the demo and for mine) has two separate issues.
1) The legend contains a separate entry for each individual bar rather than combining them (either by category field or (prefered) the color).
2) The color in the legend doesn't match the color of the bar.
Here is the creation of my chart:
$("#LDP_chart").kendoChart({
dataSource: {
data: cdata.results,
group: {
field: "id",
dir: "asc"
}
},
series: [{
type: "rangeBar",
fromField: "from",
toField: "to",
categoryField: "key",
name: "#: group.items[0].seriesName #",
colorField: "color",
spacing: -1
}],
valueAxis: {
name: "value",
min: new Date(startDate + " 00:00").getTime() / 1000,
max: new Date(endDate + " 23:59:59").getTime() / 1000,
majorUnit: 24 * 60 * 60,
majorGridLines: {
color: "black"
},
labels: {
template: "#= kendo.toString(new Date(value * 1000), 'ddd MM/dd') #",
rotation: "auto"
}
},
categoryAxis: {
name: "category"
},
legend: {
visible: true,
position: 'bottom'
},
});
Google isn't helping me here. I did find an article saying #2 isn't possible because the legend isn't using colorField parameter of the datasource, but that was pretty dated.
Hi,
I am new to your controls, and was wondering if there is a Grid example, or another control that enabled the user to create something like this:
Regards,
George C. Geschwend
I have a kendo dropdown tree and when I set the datasource after initialization via .setDataSource([...]) it triggers the change event. How do I prevent this from happening? I am setting the datasource with a local javascript array of objects. I saw in another forum post to set the value to an empty array. I tried that but it still triggered the on change event. I'm doing this because I have 2 dropdowntrees (one in a flyout panel and one in the header) that I need to keep in sync.
Here is a dojo demonstrating my issue:
https://dojo.telerik.com/iKoBOVIk/30
I'm trying to create a kendo menu that stays inside a bootstrap responsive grid. I don't want to set an explicit width, but allow users to scroll when items don't fit in the screen width.
Example: https://dojo.telerik.com/EJojofaD/6
When I try to click on a sub menu item, it closes too soon. When I remove the 'scrollable' property, clicking on child items works, but the menu overflows its containers.
How can I have a menu that stays inside a bootstrap grid column without specifying a width explicitly, and still be able to?
I have a kendo grid with custom control. Kendo Grid Export CSV is not working for me. Source code is given below. Can anyone help me.
Code running without error but CSV is not generating ( chrome).
1. kendo grid.
.Name("PayrollReport")
.ToolBar(toolbar =>
{
toolbar.Excel().HtmlAttributes(new { @class = "toolbar-field" });
toolbar.Custom()
.Text("Export To CSV")
.HtmlAttributes(new { id = "exportCSV" });
jquerry
$("#PayrollReport").on("click", "#exportCSV", function (e) {
var batchid = $("#ddlbatchidamexrpt").data("kendoDropDownList").value();
var status = $("#ddlpayrollstatus").data("kendoDropDownList").value();
//debugger;
$.ajax({
type: "POST",
url: "/Home/ExportServer",
data: JSON.stringify({ 'Batchid': batchid, 'Status': status }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
//alert("Saved Successfully");
},
failure: function (response) {
//alert("Error Occured");
}
});
e.preventDefault();
});
Home controller
[HttpPost]
<div>
@(Html.Kendo().Grid<FourCSQL.ContractorPortal.Model.Custom.WorkRequest.WorkRequestModel>()
.Name("gridTestrequest")
.Columns(columns =>
{
columns.Bound(c => c.TestName).Title(ResourceManagerClass.GetResource("CarTest", languageID)).Width(200);
columns.Bound(c => c.TestDescription).Title(ResourceManagerClass.GetResource("Car Description", languageID)).Width(460);
columns.Bound(c => c.TestToComplete).Title(ResourceManagerClass.GetResource("Car Test to complete", languageID)).Width(150);
columns.Bound(c => c.TestPriority).Title(ResourceManagerClass.GetResource("Carpriority", languageID)).Width(180);
columns.Bound(c => c.TestCode).Title(ResourceManagerClass.GetResource("CarTestCode", languageID)).Width(200);
columns.Bound(c => c.TestDepartment).Title(ResourceManagerClass.GetResource("Cardepartment", languageID)).Width(180);
columns.Bound(c => c.TestLocation).Title(ResourceManagerClass.GetResource("CarLocation Description", languageID)).Width(240);
columns.Bound(c => c.LocationDescription).Title(ResourceManagerClass.GetResource("Asset", languageID)).Width(240);
columns.Bound(c => c.WorkDescription).Title(ResourceManagerClass.GetResource("Work ", languageID)).Width(180);
columns.Bound(c => c.TestStatus).Title(ResourceManagerClass.GetResource("Status", languageID)).Width(180);
columns.Bound(c => c.TestStore).Title(ResourceManagerClass.GetResource("Store", languageID)).Width(180).Hidden(true).Exportable(true);
})
.ToolBar(toolBar =>
toolBar.Template("<a class='k-button k-button-icontext k-grid-excel btn btn-secondary btn-custom' style='float:right;margin- right:12px;color:white;' href='#'><span class='k-icon k-i-excel' style='margin-top:-1px;'></span>Export</a> "))
.Excel(excel => excel
.FileName("workrequest.xlsx")
.Filterable(true).AllPages(true)
.ProxyURL(Url.Action("AdminList", "Admin", new { @requestType = @ViewBag.RequestType }))
)
.Scrollable(scr => scr.Height(230))
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
.Pageable(pageable => pageable.Refresh(false).PageSizes(true).ButtonCount(1))
.Sortable()
.Filterable(f => f.Extra(false)
.Operators(op => { op.ForString(str => { str.Clear().Contains("Contains"); }); })
.Messages(m => m.Info("Items with value contains:")))
.DataSource(dataSource => dataSource.Ajax().Read(read => read.Action("AdminList", "Admin", new { @requestType = "pending" })))
.Resizable(resize => resize.Columns(true))
.Reorderable(reorderable => reorderable.Columns(true))
.Events(events => events.ColumnReorder("saveColumnReorder").ColumnResize("saveColumnSize"))
.HtmlAttributes(new { @class="KendoGrid"})
)
</div>
1.How We can Export the Hidden columns in Excel...?
2. In the grid has one columns values like this the user is seeing like this (volvo, benz, Audi, BMW, I20, MG,) But When user clicks on the Excel So we want show ('30lakhs', '1crore' , '80lakhs', '30lakhs', '50lakhs')
So How We can do this I have not found any link anyone can you please help me out to find for this solution.
Thanks& Regards
Hello
I am trying to create a kendo multi axis scatter plot in my application. Both Y axis is logarithmic and x axis is numeric.
Chart is displaying fine but x axis display in middle of charts. I want x axis to be display at bottom instead of middle. I trieds setting display X axis crossing values but I could not able to correct this. Please let me know what's wrong in my code.
Code
div.kendoChart({