Hi,
Following is my requirement
1. On load the Gantt is initialized with a default set of tasks called activities
2. each activity can have one or more child tasks
3. The child task is added using a Add Task button just below the activity
4. on click of Add task a new task is added as child to the activity preceeding the Add Task button/link row
I am able to achieve 1 & 3 from a UI perspective .The Add Task row is also a task which is restyled/ retemplated on databound based on a custom task type to remove other task related information and just show an add task link.
I am able to catch the event on add task click and also get the id of the row/task but i am not able to add a new task as a child programatically to the activity above These are bits of code i have tried.
function addTask(adderButtonRowId) { var gantt = $("#gantt").data("kendoGantt"); var task = getNewTask(adderButtonRowId); var taskNew = new kendo.data.GanttTask(task); gantt.dataSource.add(taskNew);}After executing this however the UI is not rendered as expected. The getNewTask method returns a task object with attributes such as parentId, orderId and id set appropriately internally so that the new task is child of the preceeding activity and in proper order.
Please let know what am i missing, Any help appreciated.Thanks in advance.
In the configuration page of the toolbar control, there is an example demonstrating the usage of items.attributes.
http://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar#configuration-items.attributes
If you run the example in the code editor (http://dojo.telerik.com/ADEDU), you will see that the "My Button" button does not render properly as a button. A look at the source shows that a few kendo classes are not added properly to the dom element, including k-button.
If you run this modified version of the example where all I changed is the version of kendo UI used, you will see that it used to work.
http://dojo.telerik.com/ULEPu
It appears the problem occurs whenever custom attributes are defined for items.
I noticed such a behavior of, let's say, "common" (e. g., "enabled") binding and event binding: when bound to a function this context differs inside it.
For example, I add 2 functions to ObservableArray's prototope:
1) logTihis: simply logs this pointer to the console
console.log(this);2) enableDelete: returns whether the array has more than 1 items (assume, I want to prevent deletion of the last item)
return this.length > 1;and a template to render repeating items ("items" field of the view model is set to an array):
<tr> <td>#= name #</td> <td><button data-role="button" data-bind="enabled: parent().enableDelete, click: parent().logThis">Delete</button></tr>When I write "parent().functionName" I expect the function to be called in the context of what parent() returns (items array in this case).
With enabed binding it is so (having 1 item in the array disables the button), while with click binding it is not so (this pointer in the click handler (logThis) is set to the item itself).
After checking the source code I found out that Binding.get does look for the actual context before calling the function while EventBinding.get does not.
Why is it so? Is not it about to be fixed?
Thank you in advance.
I am trying to include some escaped HTML codes in my tooltip text. The text is specified as a title on my DOM element. The text is set in correctly, but the Tooltip code somewhere unescapes the text and converts it back to their actual characters.
<div data-id="11" title="Test1: The word 'test' should be here in angle brackets: <test>><img src="../content/web/foods/11.jpg" /> </div>
In the Tooltip, I want this to display as literal text (when the browser interprets < and >):
Test1: The word 'test' should be here in angle brackets: <test>,
But somewhere along the line, the tooltip is converting < to < and > to >, so then the html looks like <test> (in raw ascii) which gets interpreted by the browser as an unrecognized tag and hidden.
Here is a snippet example (roll over to see the tooltips):
http://dojo.telerik.com/@Henry%20Kaufman/EjUQU
Is there any way to escape the angle brackets so that they pass through the tooltip code without being converted back to literal angle brackets? Or is there an additional attribute or option to tell the Tooltip not to un-escape the title text?
Thanks!
-Henry
Here is an example in your dojo http://dojo.telerik.com/OdolO/3
When you try to use dataItem.selected property in ng-if statement then different visual bugs appear if you have nodes with children.
Please try to click on Item2 then expand it and click on any child of Item2. You will see that Item2 title disappeared. It works on 2014 Q3. We are unable to move from 2014 version to 2015 version because of different treeview visual bugs.
We are trying to switch the visibility of some NumericTextBoxes. 'ng-show' made some appearance effects but nothing useful. 'ng-if' seems to be more promising, but we experience other effects. Instead of disappearing nothing happens and instead of reappearing additional TextBoxes appear.
Please see this example: http://dojo.telerik.com/ELOlO
Press the button to see the problem.
Any hints?
Regards
Alex
I'm using the Kendo UI TimePicker control where the min and max times can be set to the next or previous day.
When selecting a time that exists the next (or previous) day the value returned is a full DateTime but is always set to the current date.
For example, if the current date time is "Jun 25, 2015 10:00 PM" and you scroll down and select "Jun 26, 2015 02:00 AM" the return value will be "Thu Jun 25 2015 02:00:00 GMT-0400 (Eastern Daylight Time)" but I'm expecting it to be June 26.
How do I make this control return the expected DateTime.
Here are my code segments:
// Init the control
$("#dtpEndDateTime").kendoTimePicker({
format: "MMM dd, yyyy hh:mm tt",
interval: 15,
change: onShiftEndDateTimeChange
});
// Set the values elsewhere
var dtpEndDateTime = $("#dtpEndDateTime").data("kendoTimePicker");
dtpEndDateTime.value(moment(_shift.EndDateTime).toDate());
dtpEndDateTime.min((moment(_shift.StartDateTime).add(15, "minutes")).toDate());
dtpEndDateTime.max((moment(_shift.EndDateTime).add(12, "hours")).toDate());
// get the selected value inside the onShiftEndDateTimeChange event
var datetimepicker = $("#dtpEndDateTime").data("kendoTimePicker");
console.log(datetimepicker.value());