Hi,
I'm using Kendo UI Grid with a custom popup editor template and AngularJs. I'm also using localization like this example with IViewLocalizer. However, localization replace the exclamation mark by ' so my template is crashing with this error:
angular.js:13236 Error: Invalid template:' <div dir-loadtemplate> <div class="k-edit-label"><label for="AssignmentType">Type d'assignation :</label></div> <!--<div class="k-edit-field"><input ng-model="AssignmentType.AssignmentTypeId" k-options="assignmentDropDownOptions" kendo-dropdownlist k-value-primitive="false" /></div>--> <div class="k-edit-field"> <select name="AssignmentType" id="AssignmentType" k-on-change="onChangeAssignmentType(kendoEvent)" data-bind="value: AssignmentType" k-data-source="assignmentTypeDataSource" kendo-dropdownlist k-data-text-field="'Description'" k-data-value-field="'Id'" data-option-label="{Description:'',Id:null}" data-assignmentTypeValidation-msg="Assignment type is required" /> <span class="k-invalid-msg" data-for="AssignmentType"></span> </div>Source code is very simple:
<script type="text/x-kendo-template" id="template"> <div dir-loadtemplate> <div class="k-edit-label"><label for="AssignmentType">@LocString["STR_AssignmentType"] :</label></div> <!--<div class="k-edit-field"><input ng-model="AssignmentType.AssignmentTypeId" k-options="assignmentDropDownOptions" kendo-dropdownlist k-value-primitive="false" /></div>--> <div class="k-edit-field"> <select name="AssignmentType" id="AssignmentType" k-on-change="onChangeAssignmentType(kendoEvent)" data-bind="value: AssignmentType" k-data-source="assignmentTypeDataSource" kendo-dropdownlist k-data-text-field="'Description'" k-data-value-field="'Id'" data-option-label="{Description:'',Id:null}" data-assignmentTypeValidation-msg="Assignment type is required" /> <span class="k-invalid-msg" data-for="AssignmentType"></span> </div>
I tried to replace ' by '' in the localization methode without success:
protected string GetStringSafely(string name, CultureInfo culture) { var resourceValue = string.Empty;#if DNX452 var cultureName = (culture ?? CultureInfo.CurrentUICulture).Name; //var resourceFile = _resourceManager.BaseName.Substring(_resourceManager.BaseName.IndexOf('.') + 1) + "." + cultureName; var resourceFile = "Resource" + "." + cultureName; var filePath = Path.Combine(_applicationBasePath, "Resources", "bin"); if (File.Exists(Path.Combine(filePath, resourceFile + ".resources"))) { _resourceManager = ResourceManager.CreateFileBasedResourceManager(resourceFile, filePath, null); }#endif try { // retrieve the value of the specified key resourceValue = _resourceManager.GetString(name).Replace("'", "''"); } catch (MissingManifestResourceException) { return name; } return resourceValue; }
Any idea how to fix it?
Thank you
Hi,
I am using kendo grid column editor function to display dropdown for some of grid columns while editing. Also I am using columns--> filterable--> ui to provide another javascipt function for custom filter implementation.
My columns--> editor function is :
function editableDropDown(container, options){
$('<input data-bind="value:' + options.field + '" />')
.appendTo(container)
.kendoDropDownList({
dataSource: {
data: options.values
}
});
}
My columns--> filterable-->ui function is : function createmyFilter(){....}
I am creating column config from server and passing dropdown selectable items to values property from server.
The issue is that createmyFilter is not being hit for the columns where I have dropdown function implemented. If I don't pass columns.values from server. The createmyFilter function is hit, but then I don't see dropdown values while editing the field.
Can you please help me find the solution.
Thank you,
-Swatantra

hello, folks!
I'm trying to display the user name on About View. It should be simple, but don't work on this example.
So, I decided to try the same architecture on Dojo and that works >> http://dojo.telerik.com/aGuFO/5
Sample of my code >> http://jsbin.com/rifoxuyuxu/edit?html,js,output
We have a Kendo and AngularJS app that has a kendo menu at the top, tabs below that (our own custom tabs, k-buttons actually) and finally, a view container that holds whatever view we need to put into it according to whatever tab the user is on. In several of our tabs we have Kendo Grids and on one of these grids we have a right-click Context Menu. The problem is that the menu comes up at the wrong place. It's top is lower than expected, and it exactly matches the amount of the menu and tab system that we have at the top of the page, 88px.
We have numerous wrapper divs to make all this work as well as multiple controllers in descending fashion. An AppController at the top, a TabController next to handle our tab system, and finally the individual controllers that handle each tab. All our wrapper divs are set to width: 100% and height: 100% with position relative, except the one that holds the tab content, which has a height of something like calc(100% - 88px). (In reality, it's height gets set by Javascript on the Window resize event.)
When I remove all of the position relative CSS statements, the context menu behaves properly but all of the dropdownlists and and comboboxes have their list container (or whatever its called, the part that opens when you click on them) displayed 88px too high (as opposed to too low on the context menu).
We are using the latest stable version of Kendo UI Pro (with an active subscription) but we were having this problem with older versions too.
I've done some debugging on Kendo's code using the kendo.all.js file and Chrome Dev Tools. I can see that the _showHandler function event argument at line 35976 shows a pageY that is 88px different from the screenY. This doesn't tell us all that much, except that the pageY is what gets used and its 88px too low. It's almost like the reference point for the context menu is the last relative container and doesn't account for elements that have height and are contained inside other divs/containers further up the lineage.
We've been unable to duplicate this problem in Dojo. However, I do have a Dojo setup that you can look at to see roughly what we are doing. In this particular Dojo, I can't even get the Context Menu to work at all. It appears something isn't wired up right but I haven't been able to spot the problem and its now 6PM Friday evening so time to go home from work. http://dojo.telerik.com/@villagemedia/UkOCu/10

I am saving the state of a grid as per the docs:
var grid = $("#deficiencyGrid").data("kendoGrid");vm.grid.state = kendo.stringify(grid.getOptions());However, it is saving the datasource with the state. If I then add a new item and come back to the grid and restore the state any new items dont appear. I have tried setting the datasource like:
var grid = $("#deficiencyGrid").data("kendoGrid");var options = JSON.parse(vm.gridViews[i].state);options.dataSource = vm.deficiencies;options.dataBound = onDataBound;grid.setOptions(options);but this then seems to overwrite the entire state as none of the filters are applied etc..
How do I achieve what I am looking for?
Hello,
Thank you for the example on Kendo-Stock chart using AngularJS.
I want to create a kendo stock chart using AngularJS which should be based upon dynamically updated data.But I am able to do with a fixed period of time only.
Can you suggest me the solution with an example?
Regards,
Adyasha
I'm trying to add a kendoMenu as an item in a kendoToolbar,
it seems using template for dropdown works but doesn't work for menu :
any ideas how to to this ?
I have an autocomplete input setup and it all works great - except when I look in inspector after either: selecting a suggested value; or typing in a value not in the list - the input value attribute is not set.
The value in my case is needed for my material design theme, which has the floating label. Without a value in the <input value="selected value"> the label returns to the middle of the field and overlaps with the selected text.
Any idea how to make the kendoAutoComplete also set the value of the input field?
Does anyone know how far AngularJS is supported for the treemap widget?
I get the feeling "k-data-source" and "k-rebind" don't seem to work. Is the treemap mature enough to be used with AngularJS
or should I stick to JQuery for this one?
thanks for the advice,
Arno