Hello
I have a kendo grid bound to the following kendo template code in MVC.
<script type="text/kendo-tmpl" id="AgencyItemTemplate">
@Html.Action("MyTemplate", "MyController", new {area = "MyArea"})
</script>
This actions renders another kendo grid with the following code:
@(Html.Kendo().Grid<SomeModel>()
.Name("MyGrid_#=idFromTemplateCaller#")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Refresh", "MyController", new { area = "MyArea", idFromTemplateCaller= "#=idFromTemplateCaller#" }))
.Sort(sort => sort.Add(c => c.CreatedDateTime).Descending())
)
.Columns(cols =>
{
cols.Bound(a => a.FirstProperty)
.Width(80)
.Format("{0:c}");
cols.Bound(a => a.SecondProperty)
.Width(80)
})
.ToClientTemplate()
)
This works fine, the way it works is the following. There is a "master grid" which offers the user to see details of each of the records. These details are shown in the grid inside the template, passing the "idFromTemplateCaller" to retrieve the appropiate details for each record. What I want to do is the following: when there are no details, remove the grid and show the following custom element
<div id="noDetailsFound" style="display: none;">
No details found
</div>
This I would normally achieve by binding a custom event to the Databound of the grid by adding the following line of code
.Events(e => e.DataBound("myPageNS,myJSEvent"))
And the event would be defined in the same details grid file as follows:
<script type="text/javascript">
(function(){
this.myPageNS = this.myPageNS || {};
myPageNS.myJSEvent = function(){
alert("fire databound event");
}
}());
</script>
However, I am unable to write javascript code inside the template file. I guess this is because templates are in fact javascript code, so I cannot call the <script> tag. Can you please help? I need this code to be in the same file as the grid, I now that putting it outside the kendo template might work but I do not want to do it because it wouldnt follow my architecture principles.
I investigated and saw that I am able to write JS code inside the hash symbol #. However, this doesn't work properly in the IIFE. It fails systematically
Greetings,
Luis.
Hi there!
I am using the Group Footer Template in the Kendo UI Grid using Angular JS:
groupFooterTemplate: "<input id='PlansTY_SubTotal' type='number' value='#=sum#' ng-model='planChange' ng-change='onPlanChange()'>"
The onPlanChange() function is not getting fired.
Thanks!
Hi there,
I am seeking to achieve the same outcome as described in this forum post - changing the default behaviour of the numeric textbox when a min and max value has been supplied. The default behaviour is
I had already tried to implement something similar to the solution mentioned in that forum post - however, it doesn't work (presumably because the controls have been updated since). By the time the validation rule runs, the value has already been adjusted to the maximum value, so the rule always passes.
Can you advise how I can achieve this behaviour? I am using Q3 2014.
Thanks,
Paul.
I am trying to utilize a Kendo UI scheduler in an Angular app. After much frustration and realizing that Kendo UI does not support angular templates properly for the scheduler editor, I'm trying to re-implement the "standard" editor as a Kendo UI template. This is not my preferred method (I'd rather it work from an Angular template), but from what I've read, I don't have a choice at this time.
I'm using the latest Kendo UI Pro v. 2015.1.408
I need the full template layout and behavior including timezone (not needed right now, but useful), the full editor for repeating tasks, and the resource editor. I will be adding custom fields to it in certain circumstances.
I found a template for version 2013.3.1119 but this is way out of date, I would think...
http://www.telerik.com/support/code-library/custom-editor
Thanks!
Hi
I took your example of virtual scrolling and added a detail template:
http://dojo.telerik.com/oCiTO
When I scroll to the bottom and expand row 49'999 then the scroll area does not get adjusted - ie. the row 50'000​ is not visible or gets cut.
How can this be fixed? Rerender the grid somehow?
Many thanks

I'm wondering if it's possible to exclude parent nodes in the treelist when using a filter. For example, let's say we have the following data:
Animal: { id: 1 parentId: null name: "Animal"}Dog: { id: 2 parentId: 2 name: "Dog"}
When I populate a treelist with this data, I filter by the string "dog". What displays is the parent node "Animal" with the child node of "Dog". I'd like to only display the child node "Dog" since it matches my filter. Is this possible or does the parent node always have to be present?
Hi Telerik Team,
I have defined custom event template for my scheduler. When I move event in the scheduler I am getting errror as "Uncaught TypeError: Cannot read property 'occurrenceByUid' of undefined".
When I debugged the Javascript and found that the error is coming in the below code
(function(data
/**/) {
var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='\n ';var uid = target.attr("data-uid");;$kendoOutput+='\n ';var scheduler = target.closest("[data-role=scheduler]").data("kendoScheduler");;$kendoOutput+='\n ';var model = scheduler.occurrenceByUid(uid);;$kendoOutput+='\n \n ';if(model) {;$kendoOutput+='\n <strong>Job Start:</strong> '+(kendo.format('{0:ddd M/dd, hh:mm tt}',model.start))+'<br />\n <strong>Job End:</strong> '+(kendo.format('{0:ddd M/dd, hh:mm tt}',model.end))+'<br />\n <strong>Job Details:</strong> '+(model.title)+'<br />\n <strong>Job Address:</strong> '+(model.Address)+'\n ';} else {;$kendoOutput+='\n <strong>No event data is available</strong>\n ';};$kendoOutput+='\n';}return $kendoOutput;
})
where the "var scheduler = target.closest("[data-role=scheduler]").data("kendoScheduler")" is undefined and the error is coming. Please help how to fix it.