I've got a situation where I want to return data from the controller if there are errors on the file i'm uploading.
For simple messages, i can just do [return Content("error")] which will cause the uploader to show an error message (with relevant error items - red colour, X icon etc).
However, i have a case where i am returning a JSON object with details of all the issues with the uploaded file like so [return Json(returnItem)].
I would expect the upload control to fail (as the documentation states it only accepts an empty string to be the success case) but i am getting the success behaviour from the upload control (green text).
How can i make it so it shows the error state when i am returning a JSON object?
Thanks
Hello,
Is it possible to dynamically toggle the enabled status of multiple ComboBox widgets at once using a Jquery class selector and iterating the results? If this is possible, what is the proper way to accomplish this behavior? My form has multiple ComboBoxes which need to by dynamically enabled or disabled based on user selections.
Using UI for MVC (Q3 2016)
My current attempt at this behavior is as follows:
         @(Html.Kendo().ComboBoxFor(Model => Model.InsertStockWeightOption)
          .Placeholder("Select Weight Or Specify")
          .HtmlAttributes(new { style = "width:100%;", @class = "ComboBoxDisableOnStartup", id="TestCombo" })
          .DataSource(source => source.Read("GetStockWeightsForType", "ProjectQuote", new { Type = "Insert" })))
JS Code to disable on document creation:
        $(document).ready(function () {
            $(".ComboBoxDisableOnStartup").each(function (i, box) {  //This code does not function clearly, this is only to convey the attempt to toggle using classes
                var obj = box.data("kendoComboBox");
                obj.enable(false);
            });
            var combobox = $("#TestCombo").data("kendoComboBox");  //This code is from the documentation and works for a single ComboBox with an ID
            combobox.enable(false);
        });

function resetDateTimePickersToDefaultDateTimeRange() {    var currentDate = new Date(),        yesterdayDate = new Date(),        dateTimeFormat = 'MM/dd/yyyy hh:mm tt';    yesterdayDate.setDate(yesterdayDate.getDate() - 1);    var $startDateTimePicker = $('#StartDateTimePicker').data('kendoDateTimePicker');    var $endDateTimePicker = $('#EndDateTimePicker').data('kendoDateTimePicker');    $endDateTimePicker.value(kendo.toString(currentDate, dateTimeFormat));    $endDateTimePicker.trigger('change');    $startDateTimePicker.value(kendo.toString(yesterdayDate, dateTimeFormat));    $startDateTimePicker.trigger('change');}
And just for completeness, here are the change events I have wired up for each of the DateTimePicker's:
function kendoStartDateTimePickerChange() {    var endPicker = $('#EndDateTimePicker').data('kendoDateTimePicker'),        startDate = $('#StartDateTimePicker').data('kendoDateTimePicker').value();    if (startDate) {        startDate = new Date(startDate);        startDate.setDate(startDate.getDate() + 1);        endPicker.min(startDate);    }}function kendoEndDateTimePickerChange() {    var startPicker = $('#StartDateTimePicker').data('kendoDateTimePicker'),        endDate = $('#EndDateTimePicker').data('kendoDateTimePicker').value();    if (endDate) {        endDate = new Date(endDate);        endDate.setDate(endDate.getDate() - 1);        startPicker.max(endDate);        if (endDate < startPicker.value()) {            startPicker.value(endDate);        }    }}And here is where I am calling the reset() function:
$('#ResetFilterButton').click(function () {    $('#FilterByInput').val('');    resetDateTimePickersToDefaultDateTimeRange();    populateGrid($('#StartDateTimePicker').val(), $('#EndDateTimePicker').val(), $('#FilterByInput').val());});Hi, I have seen that you have a "theme builder" tool.
It allows customize an existing theme and download it.
I already have customized and downloaded a thema but now I want to make a small modification.
¿I can import / upload my theme to the "theme builder" tool and make a modification?
or
¿I have to re-use an original thema and redo all changes over the original theme?

Hello,
I load the following via ajax and the shown javascript Alert fires proving jquery and javascript are working. Editor Events work but I need to clear the editor contents programmatically. At the console, well after all loaded and completed, $("#editor") is undefined. I am looking at this documentation. http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/editor/overview#existing-instances
 <div id="editorWrapper">
            @(Html.Kendo().Editor()
            .Name("editor")
            .HtmlAttributes(new { @class = "desc-editor", name = "Description", id = "Description" })
            .Resizable(resizable => resizable.Content(true).Toolbar(true))
            .StyleSheets(css => css
            .Add(Url.Content("~/Content/editorStyles.css"))
            )
            .Tools(tools => tools
            .Clear()
            .Bold().Italic().Underline().Strikethrough()
            ).Events(events => events
            .Change("change")
            .Execute("execute")
            .Select("select")
            .Paste("paste")
            ).Value(@<text> </text>)
            )
            <script>
            $(function () {
                alert($(".input-field").length);
                //Notice that the Name() of the Editor is used to get its client-side instance.
                var editor = $("#editor").data("kendoEditor");
            });
            </script>
        </div>
I was working on the grid persistence with getOptions and setOptions. I believe I was able to get it to work successfully, but I noticed something on one of filters.
My grid has a dropdown selection, like in the 'Grid / Filter menu customization' demo. After the setOptions is called, the filter dropdown is blank.
We use the asp.net mvc version, but I was able to reproduce this error in the browser using the javascript console on both the asp.net mvc and the kendo ui versions of the 'Grid / Filter menu customization' demo (which has a filter dropdown on the City column).
In my above test of the 'Grid / Filter menu customization' demo, I saw the City filter dropdown go blank after setOptions is called. You are no longer able to select from a dropdown of cities.
Any input would be appreciated!
.Pageable(pager => pager.Enabled(true).PreviousNext(true).PageSizes(new Int32[] {10, 20, 50, 100}))
I just downloaded the latest version of the js files and the Kendo.Mvc.dll
If I remove PageSizes I don't get an error. Any clues?
==========================================================================================
Also, when I add .DataSource binding paging stops working entirely@(Html.Kendo().Grid(Model.AppointmentList).Name("FailedAppointments") .Columns(columns => { columns.Bound(o => o.MemberFirstName).Title("Member First").Width(70); columns.Bound(o => o.MemberLastName).Title("Member Last").Width(80); columns.Bound(o => o.ClientMemberID).Title("Client ID").Width(60); columns.Bound(o => o.ProviderID).Title("Provider ID").Width(60); columns.Bound(o => o.ProviderFirstName).Title("Provider First").Width(70); columns.Bound(o => o.ProviderLastName).Title("Provider Last").Width(100); columns.Bound(o => o.AppointmentDate).Title("Appointment Date").Width(200); columns.Bound(o => o.IHAAppointmentID).Hidden(true); }) .Pageable(page => page.Enabled(true)) .DataSource(source => source.Ajax().Read(read => read.Action("BindFailedAppointments", "AppointmentScheduling")))This is the result:
If I remove the DataSource binding, paging shows but does nothing. What is going on?
We have AutoComplete working in MVC with this in the view:
@(Html.Kendo().AutoComplete().Name("ContentTagsAddt").DataTextField("TagName").HtmlAttributes(new { style = "width:700px" }).Placeholder("Begin Typeing Additional Tags...").MinLength(3).Filter("startswith").Separator(", ").Value(Model.AdditionalContentTags).DataSource(source => source    .Custom()    .Group(g => g.Add("TagGroup", typeof(string)))    .Type("aspnetmvc-ajax")    .ServerFiltering(true)    .ServerPaging(true)    .PageSize(20)    .Transport(transport => transport        .Read("GetContentTag", "Article")    )    .Schema(schema =>    {        schema.Data("Data")            .Total("Total");    })))And it's datasource looks like:
public JsonResult GetContentTag([DataSourceRequest] DataSourceRequest request){    var tags = oandpService.GetContentTags();    return Json(tags.ToDataSourceResult(request));}The table it's using to populate is pretty small (37 rows). We'd really like to have the ability to show all items on focus. Would that be possible? An added bonus is if the AutoComplete stays open the entire time and as the person types it highlights the suggestions.

I'm trying to bind a MultiSelect to a list of strings. How do I write an data-binding expression for DataTextField and DataValueField?
@model List<string>
@Html.Kendo().MultiSelect().BindTo(Model).DataTextField("?").DataValueField("?")
I have a Spreadsheet which already Bind to an object (see below code). I want to open a file (import) and Bind it with my existing binding.
@(Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheetsbar(false)
.Toolbar(x => x.Data(false).Insert(false))        
.HtmlAttributes(new { style = "width:100%;" })
.Rows(5000)
.Events(e => e.ExcelImport("ImportProduct"))        
.Sheets(sheets =>
{
sheets.Add()
.Name("Product")
.DataSource<MyCompany.DTO.Logistics.Planning.ProductSearchResultDTO>(ds => ds
.Ajax()
.Batch(true)
.Read(r => r.Action("ProductBulkSearchResults", "Logistics").Data("getCriteria"))
.Update(u => u.Action("ProductBulkUpdate", "Logistics").Data("getCriteria"))                    
.Events(e => e.Change("onChange"))
.Model(m =>
{
m.Id(p => new { p.ProductID, p.ORGID });
})
)
.Columns(columns =>
{
columns.Add().Width(100);
columns.Add().Width(415);
columns.Add().Width(0);
columns.Add().Width(0);
columns.Add().Width(145);
})
;
})
)
