I have an application where the order of siblings under a node in the tree list is important and I would like to build upon the the demo at https://demos.telerik.com/kendo-ui/treelist/dragdrop whereby if I drag a node up or down within a branch, I can persist its order.
In this example, if I drag Rinah above Akim in the list beneath Hyacinth, I would like to persist that order.
I have been doing this fairly crudely by assigning an order field to each node - but figure there must be a better way. Any suggestions?
Hi
I am having two issues with Kendo Tab Strip(AnguarJS) as followings:
1) Default HTML tag 'li' is showing before Kendo Tab strip is applied
- Default HTML tag 'li' is showing for 1 second(see the screenshot '1') and then Kendo Tab strip is applied
- I tried to use ng-cloak and also k-ng-delay, it is still showing default HTML tag
- I do not want to show default HTML tag, I want to display Kendo Tab Strip once it is fully initialized
- *I am using ng-repeat for dynamic tab, not data-bound. I prefer to use ng-repeat as each tab contents are quiet large
2) After add a new tab(by some button), UI for a new tab is broken
- As I mentioned above, I am using ng-repeat and add a new object to existing array to add a new tab.
- I guess this would be a bug, it would be great if you can provide the example with ng-repeat scenario
Kind regards
Minchul
My requirement is to have multi select dropdown and foreign key in the kendo grid. It's working fine when i update records one at time, but if i want to do it with batch update, how can i do that?
@(Html.Kendo().Grid<Rostering.Models.ViewModels.RosterShiftAllocationViewModel>()
.Name("rgAllocation")
//.Events(e => e.Change("rgAllocation_Save"))
.Editable(editable => editable.Mode(GridEditMode.Incell))
.ToolBar(toolbar =>
{
toolbar.Save().HtmlAttributes(new { @class = "no-print" });
})
.Columns(c =>
{
c.Bound(e => e.Id).Visible(false);
c.Bound(e => e.StartEndDetail).Title("Start and End").EditorTemplateName("").HtmlAttributes(new { @class = "cellBorder", @style= "color: red" });
c.Bound(e => e.RollNumber).Title("Payroll Number").HtmlAttributes(new { @class = "cellBorder" });
c.Bound(e => e.StaffMember).Title("Staff Member").HtmlAttributes(new { @class = "cellBorder" });
c.Bound(e => e.Grade).Title("Grade").HtmlAttributes(new { @class = "cellBorder" });
c.Bound(e => e.ShiftBeds).ClientTemplate("#=bedsTemplate(RosterShiftBeds)#").Title("Allocation").HtmlAttributes(new { @class = "cellBorder" });
c.Bound(e => e.AllocationComments).Title("Comments").HtmlAttributes(new { @class = "cellBorder" });
c.Bound(e => e.ShiftType).Title("Shift Type").HtmlAttributes(new { @class = "cellBorder" });
c.ForeignKey(p => p.AllocationSpecialId, (System.Collections.IEnumerable)ViewData["AllocationSpecial"], "AllocationAlertTypeId", "Description")
.EditorTemplateName("AllocationSpecialEditor")
.ClientTemplate("#=AllocationSpecialDescription#")
.Title("Special")
.HtmlAttributes(new { @class = "cellBorder" });
c.Command(command => { command.Edit(); }).Width(100).HtmlAttributes(new { @class = "no-print"});
})
.Events(events => events.Save("on_rgAllocation_Save"))
.DataSource(d =>
d.Ajax()
.Batch(true)
.Model(model =>
{
model.Id(e => e.Id);
model.Field(e => e.ShiftStartEndDetail).Editable(false);
model.Field(e => e.RollNumber).Editable(false);
model.Field(e => e.StaffMember).Editable(false);
model.Field(e => e.Grade).Editable(false);
model.Field(e => e.ShiftType).Editable(false);
model.Field(e => e.ShiftBeds).DefaultValue(new List<ShiftBedViewModel>());
})
.Read(r => r.Action("GetShiftDetailByDateId", "Home").Data("getAllocationParams"))
.Update(update => update.Action("UpdateShiftAllocationDetails", "Home"))
)
)
function on_rgAllocation_Save(e) {
console.log("i m called _ on rg Allocation");
if (!e.model.AllocationSpecialId) {
//change the model value
e.model.AllocationSpecialId = 0;
//get the currently selected value from the DDL
var currentlySelectedValue = $(e.container.find('[data-role=dropdownlist]')[0]).data().kendoDropDownList.value();
//set the value to the model
e.model.set('AllocationSpecialId', currentlySelectedValue);
if (e.model.RosterShiftBeds.count > 0) {
$.each();
}
}
}
and this is my multiselect editor template
@model IEnumerable<Rostering.Models.ViewModels.ShiftBedViewModel>
@(
Html.Kendo().MultiSelectFor(m => m)
.DataTextField("BedName")
.DataValueField("BedId")
.Placeholder("Select")
.DataSource(d => d.Read(r => r.Action("OrgUnitBeds", "List").Data("getUnit")))
)
There are a few different ways described to select the first row in a grid programmatically, but they all seem to rely on the markup of the grid, and not the data in the grid.
For instance, one way is this:
kendoGrid.select(
"tr:eq(1)"
);
However, that only works if there is no filtering. If filtering is enabled (Mode = "Row"), than the code needs to be
kendoGrid.select(
"tr:eq(2)"
);
Of course, we could check if filtering is enabled (this is dynamic in our case), and adjust the code accordingly. Still, it doesn't feel robust, instead it would be better to select referencing the data, something like:
kendoGrid.selectAt(0);
The selectAt method doesn't exist, but are there other ways?
Hi
Is there a way to force poster image to be shown instead of the first video frame when autoplay is false?
As far as I can see Kendo generated video tag does not have poster tag and when I add it with jQuery attr() method… it does not work as video preloads first frame and just shows black rectangle.
Partial fix is adding (with jQ) preload=none attribute to video tag but then "current play time" shows actual date/time (full format) instead of 00:00:00.
I am out of ideas…
Hello
I'd like to make a custom editor for the Form. I would like to have a button and a read-only textbox. The button trigger a method that opens a dialog containing a list of items. The item(s) are selected and the data is returned back to the form and placed i the text box.
Is this possible? Any chance there are more examples of custom editors?
Thank you
Jeff
Hi All,
I am new to Kendo, can you please help me with the below scenario.
In the current scenario, when I enter 3 letters, the call is going to the database, but I want to call database only when I focus out of the textbox , I don't want to call database after 3 letters. how to achieve this, below is my code block.
(function ($, kendo, undefined) {
var templates = {
description:
'<input data-role="autocomplete" type="text" data-text-field="description" data-filter="contains" data-min-length="3" data-bind="source: colors, value: autoCompleteValue/>'
};
var seceditor = Widget.extend(
options: {
columns: [
{
template: kendo.template(templates.description)
}
]
});
ui.plugin(seceditor );
})(jQuery, window.kendo);
Thanks,
Tram
Hi,
I have some doubts about coordinates.
How to get pixel cordinates of a lat, lng point?
I tried locationToView and locationToLayer without success ..
Here a script example:
$(
"#map"
).kendoMap({
zoom: 3,
center: [45, 10],
layers: [{
type:
"tile"
,
urlTemplate:
"http://a.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png"
,
attribution:
"© OpenStreetMap"
}],
markers: [{
location: [45, 10],
shape:
"pinTarget"
}],
pan:
function
(e) {
console.log(
'What are now marker pixel coordinates?'
)
}
});
Hello,
I have a graph showing values throughout a day (from midnight to midnight) in quarter-hour periods.
My question is, if there is a tool to display graph in corresponding way - to show the data like they are measured in the corresponding period, not at the ticks, that means to place columns into gaps between ticks and labels onto ticks (so column wouldn't be above label).
Example is attached.
Thanks for response in advance.
Jiri