Hi, I am using Kendo for ASP.Net MVC version 2015.2.264
I am trying to set the selected value of a dropdown list programatically via javascript as follows, but it always returns null:
var ddl = $("#selDFTAlignment").data("kendoDropDownList");
if (ddl == null) { alert('null ddl'); return; }
ddl.select("1");
I use the MVC wrappers to define the dropdown which generates the dropdown script as follows:
jQuery(function(){jQuery("#selDTFAlignment").kendoDropDownList({"dataSource":[{"Text":"Left","Value":"0"},{"Text":"Centre","Value":"1"},{"Text":"Right","Value":"2"}],"dataTextField":"Text","template":"\u003cspan\u003e#:data.Text#\u003c/span\u003e","valueTemplate":"\u003cspan\u003e#:data.Text#\u003c/span\u003e","dataValueField":"Value"});});
The dropdown list is inside a div container for a modal popup:
<div id="mdlDefaultText" class="modal fade" role="dialog">
Why is the selector not working? Am I missing something?
I've run into a rather specific bug that only occurs when using the MVC helper - an equivalent grid created using Javascript works as expected. This is using Kendo UI v2015.2.624 (Kendo MVC 2015.2.624.545) and is non-browser-specific (reproed in Chrome, Firefox, and IE).
In a grid in batch edit mode, grouped by a column, with some frozen columns, the delete command button will only delete some of the columns in the row it's in. If the delete button is locked (and thus in the locked column section) it will only delete the locked columns for that row; if it's an unlocked column, it will only delete the unlocked columns. You have to Cancel Changes, or Save Changes and refresh the grid, to get both sides to match again.
I've attached a picture showing the error. I also have a test MVC project with two equivalent grids - one created with the MVC helper, one created with Javascript. (I can't attach it because it's 16MB when zipped, and the maximum attachment size is 2MB.) The MVC helper grid displays this error, and the Javascript grid does not. Both grids have a locked and unlocked delete button to show how it only deletes each section in the MVC grid. The delete function is only a stub, so Save Changes doesn't work, but it's not needed to display the bug.
I'm sure I could hook into an event and hide the rest of the row myself, but I'm not sure I should have to, since the javascript grid works well. Is this a known bug? Is there an existing workaround?
I am evaluating Telerik ASP.NET MVC for a small shop of C# developers with minimal to no javascript background. In particular the DropDownList event demo (but the same problem applies to many of the demos). The demo link here:
http://demos.telerik.com/aspnet-mvc/dropdownlist/events
Now a typical use case for this component for an ASP.NET MVC developer would be to:
1.Load the DropDownList from an MVC Controller
2. Detect a selection changed event
3. Do something with the selected value in an MVC context, such as having an ActionLink in a Razor view to pass the selected item back to the mvc controller as an action param, or calling a GET on an MVC controller from JavaScript with the selected value in order to demonstrate the "full round trip"
Instead these demos show the bare minimum (outputting to client side log). It would be nice for these demos go the extra mile to show some real non-trivial use-cases in the example code. Sure, you can find the answer to the above stuff by spending half a day in the forums hoping someone else had the same question and searching stackoverflow, etc, but for us the quality and depth of the example code will be the deciding factoring in purchasing a license, thanks
Hi,
I want to use custom button in kendo grid toolbar which work as save changes button (i.e send edited list of rows),
I have a grid which has a checkbox column "Select" , so when the checkbox is checked the row comes in edited state, and by simply pressing the Save Changes button I could send edited rows to controller method.
But problem is that I need two buttons (i.e Approve and Reject which needs to work same as the "Save Changes" button does) to do different tasks on selected records.
Attached here is snapshot.
Hi,
I have a grid with several ForeignKeyColumns.
In IE11 when I click on a column the dropdown opens (for a blink) - the input moves a bit - and after that it works as expected.
I can also Tab through the fields - if I focus them first they move a bit (without opening) and after it they work normal.
In chrome the "initial moving and ''blink' opening" does not occur.
This only happens in IE when the column is to small to display the whole dropdown.
Hi,
I use a MultiSelect to choose several values in an m:n relation.
Everything works as expected as long as I select one or more values.
But when I select nothing I get the following error:
0x800a138f - Laufzeitfehler in JavaScript: Die Eigenschaft "length" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
The failing code is for(n=0,i=e.length;i>n;n++)o+=n%2?s(e[n]):a(e[n]),r._data.push(e[n]);return o}
This happens only when I add a new record.
If I edit an existing one it is possible to remove the formerly chosen element and update after this.
I initialize the field via model.Field(p => p.Salads).DefaultValue(new List<EECanteen.Models.FoodItem>());
To explain my problem - I want to edit meal offerings for a day and can choose from zero or more salads.