I'm having trouble trying to force the autocomplete to open with all options present by default. Any thoughts on how to accomplish this?
Thanks.
Hi,
I use autoFitColumn function on a column object and the function applies on the next column (I think there is a problem between model index and view index).
The first column of my grid is frozen then the second column is autofited properly and the third column autofits the fourth one. The grid is scrollable and all columns are visible.
If I change the 'locked' property of the first column, then the autoFitColumn works properly so I suppose there is a bug.
We are using Kendo v1.521 (I also try to use the last version but the problem is the same)
I have changed your code in autoFitColumn function from this :
if (that.lockedHeader && visibleLocked >= index && !isLocked) { index -= visibleLocked;}to that :
if (that.lockedHeader && !isLocked) { index -= visibleLocked;}And it seems to work properly. What do you think about it ?
Thanks for your help.
Regards

Hi,
Since there is no built in way to select multiple dates in one DatePicker, we are building our own with a few modifications to the regular DatePicker (the UserVoice request for what we need is here: http://kendoui-feedback.telerik.com/forums/127393-telerik-kendo-ui-feedback/suggestions/4122749-add-range-select-to-datepicker). One problem we are facing is that we cannot figure out how to modify the "value" displayed in the text input for the DatePicker. After the user selects a 2nd date, we would like to show the range they selected in the input. How can we do this?
Here are some things I have experimented with:
$("#datepicker").kendoDatePicker({
value: new Date(2013, 10, 10),
change: function (e) {
var exampleRangeSelectionText = (new Date("2015-6-6")).toLocaleDateString() + " - " + (new Date("2015-6-8")).toLocaleDateString();
console.log(exampleRangeSelectionText);
//Does NOT work
this.value(exampleRangeSelectionText);
//Does NOT work
//$("#datepicker").attr("value", exampleRangeSelectionText);
}
});
We recently updated to the latest kendoUI 2015.1.429 and noticed a weird issue on the dropdownlist select event. Here is the code:
@(Html.Kendo().DropDownListFor(m => m.Deficiency.correctionId) .DataTextField("Description") .DataValueField("CorrectionId") .HtmlAttributes(new { id = "Deficiency_correctionId" }) .OptionLabel("-- Select Correction --") .Events(e => e.Select("onDeficiencyCorrectionDDLSelect").DataBound("CorrectionDDLDataBound")) .BindTo(Model.Corrections))function onDeficiencyCorrectionDDLSelect(e) { var correction = this.dataItem(e.item.index());...When I set an OptionLabel and get the dataItem using e.item.index() in the select event, I get the previous data item in the list. However, if I removed the index() and just use this.dataItem(e.item); then it works fine. Also, in cases where I don't use the OptionLabel and in KendoComboBoxes are OK. Has this changed since the last update? I ask because we are doing this in many places and also noticed this usage on other posts in this forum as well.
Thanks,
Quynh
Hello! I'm developing a web application using ASP .NET MVC 5 with KendoMVC and KendoUI.
I'm implementing two master and detail grids, but not with nested detail grid inside master grid like here: http://demos.telerik.com/aspnet-mvc/grid/hierarchy nor with detail template like here: http://demos.telerik.com/aspnet-mvc/grid/detailtemplate
Actually I have two different grids, when you select a row in the master grid, the details of that row are visualized in the detail grid.
The datasource is made by Ajax binding, I read data from an action in a controller and I pass to that action some extra data, some snippet code at the end of the post.
Briefly speaking, when I select a row from master grid, the "gridOnchange" event is fired, inside that function I create a new kendo.data.dataSource like this:
var dataSource = new kendo.data.DataSource({ schema: { data: "Data", total: "Total" }, change: function() { detailGrid.refresh(); if (detailGrid.pager != undefined) detailGrid.pager.refresh(); }, transport: { read: { url: baseUrl + "Service/DoSelectGrid", datatype: "json", type: 'POST', cache: false, data: { detailParams: JSON.stringify(detailParams) } } } }); thus this dataSource is bound to detail grid and than the data is fetched, like this:
detailGrid.dataSource = dataSource; detailGrid.options.dataSource = dataSource; if (detailGrid.pager != undefined) detailGrid.pager.dataSource = dataSource; detailGrid.dataSource.fetch(function() { if (detailGrid.pager != undefined) { detailGrid.dataSource.pageSize(oldDs.pageSize()); detailGrid.dataSource.page(oldDs.page()); } });all is working but I have some problems with pagination and grouping, for pagination I have resolved with extra code (like that in last code snippet), also catching the events e.RequestStart("gridOnRequestStart").RequestEnd("gridOnRequestEnd") helps to re create the dataSource and re fetching the data but is a bit tricky and the grouping in detail grid still does not work.
My questions are, is there any other way to achive this? Some best practices? Some easiest way? Any advice?
And finally...why in the detail grid the pagination and grouping fail, and it doesn't behave like a "normal" or "regular" grid?
Thanks a lot!
Razor View: grid.Events(e => e.DataBound("gridInit").Change("gridOnChange"));
{ var ajaxDsBuilder = ds.Ajax(); ajaxDsBuilder.Model(model => model.Id("Id")).Events(ev => ev.Error("gridOnError")).ServerOperation(true); ajaxDsBuilder.Events(e => e.RequestStart("gridOnRequestStart").RequestEnd("gridOnRequestEnd")); ajaxDsBuilder.Read(read => read.Action("DoSelectGrid", "Service").Data("grid.getGridMainParams").Type(HttpVerbs.Post));});Controller:
[HttpPost]public ActionResult DoSelectGrid([DataSourceRequest] DataSourceRequest request, string detailParams){ //code return Json(LocalDataTable.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);}
Hello Telerik team.
I bind grid use this example MVVM bound forms
I see this line to build grid
<div data-role="grid" data-sortable="true" data-bind="source: expenses" data-columns='["Type", "Merchant", "Amount"]' ></div>But I don't know how to add more columns(update, delete, template etc..) to this grid. Can you help me ?
Thank you.

Hello,
I have colored rows in the left part of the Gantt like in this example http://dojo.telerik.com/ADaB/7. I want to add bottom border to the rows for splitting them.
If I add the following code in "dataBound" event
//add border to rows
gantt.element.find(".k-treelist .k-grid-content tr td").each(function (e)
{
this.style.borderBottom = "solid 1px #000000";
});
tasks' height between left and right Gantt parts becomes unsynchronized like here: http://dojo.telerik.com/ADaB/14.
When you uncomment code for adding borders to the right part of the Gantt
/*gantt.element.find(".k-gantt-rows tr td").each(function (e) {
this.style.borderBottom = "solid 1px #000000";
}); gantt.element.find(".k-gantt-tasks tr td").each(function (e) {
this.style.borderBottom = "solid 1px #000000";
});*/
tasks' height between left and right parts becomes synchronized, BUT scroll down right part and see that table with css class ".k-gantt-columns" ends earlier (it has fixed height) than tables with classes ".k-gantt-rows" and ".k-gantt-tasks". Then scroll right part to the right and see that dependency arrows are moved from correct vertical position.
My goal is to split rows by boder in the left part. How can I do it???
The problem persists in the latest version of Kendo UI also.
Hello,
posted in DataSource forum, nobody answers, maybe here is the right place.
In some demos & examples I found this : "stringifyDates": true in the data source configuration,
but didn't find anything in the documentation about this.
another thing on same subject, I try to use the parameterMap , to parse the model sent to the server,and stringify the date in the model "SupplyDate": { "type": "date" }, but its never called! please see example here.
var ds = new kendo.data.DataSource({ "type": (function () { if (kendo.data.transports['aspnetmvc-ajax']) { return 'aspnetmvc-ajax'; } else { throw new Error('The kendo.aspnetmvc.min.js script is not included.'); } })(), "transport": { "read": { "url": '/Controller/Products_Get', "data": function () { return { "OrderNumber": "0001" }; }, "complete": function (jqXHR, textStatus) { if (textStatus == "error") { var msg = "read event completed with error. invalid url or other javascript error"; console.log(msg); } else { var result = JSON.parse(jqXHR.responseText); console.log("jqXHR.responseText:\n" + jqXHR.responseText, '#ffffff', '#0011cc'); } } }, "update": { "//type": "POST", //"dataType": "json", //"contentType": "application/json", "url": '/Controller/Product_Upsert', "complete": function (jqXHR, textStatus) { Parse_UpsertOrDelete_Complete("update", jqXHR, textStatus); } }, "create": { //"type": "POST", //"dataType": "json", //"contentType": "application/json", "url": '/Controller/Product_Upsert', "complete": function (jqXHR, textStatus) { Parse_UpsertOrDelete_Complete("create", jqXHR, textStatus); } }, "destroy": { //"type": "POST", //"dataType": "json", //"contentType": "application/json", "url": '/Controller/Product_Delete', "complete": function (jqXHR, textStatus) { Parse_UpsertOrDelete_Complete("destroy", jqXHR, textStatus); } }, "stringifyDates": true, "prefix": "", "parameterMap": function (data, operation) { console.log("operation: " + operation + " data: " + JSON.stringify(data)); if (operation === "update" || operation === "create" || operation === "destroy") { return JSON.stringify({ entity: data }); } return data; } }, "pageSize": 1000, "page": 1, "total": 0, "serverPaging": true, "serverSorting": true, "serverFiltering": true, "serverGrouping": true, "serverAggregates": true, "filter": [], "error": function (jqXHR) { console.log("jqXHR.status =" + jqXHR.status); }, "schema": { "data": "Data", "total": "Total", "errors": "Errors", "model": { "id": "OrderNumber", "fields": { "OrderNumber": { "type": "number" }, "SupplyDate": { "type": "date" }, "CustomerName": { "type": "string" }, "Units": { "type": "number" } } } }});
function Parse_UpsertOrDelete_Complete(action, jqXHR, textStatus) { // handle complete...}
Controller
class ProductEntity { public int OrderNumber {get;set;} public DateTime SupplyDate {get;set;} public string CustomerName {get;set;} public int Units {get;set;}} [AcceptVerbs(HttpVerbs.Post)]public async Task<ActionResult> Product_Upsert([DataSourceRequest]DataSourceRequest request, ProductEntity entity){ ProductEntity product = entity; // product.SupplyDate not set correctly when not using // ( "stringifyDates": true in the DataSource ) }
Thanks