Below find my code. I am using MVVM to initate a range-slider. It appears that when the page loads, both knobs are to the left most side, instead of one at the min and one at the max.
Please note: sometimes when the page loads, the knobs are positioned correctly.
Please advise.
<
script
type
=
"text/x-kendo-template"
id
=
"filterAgeTemplate"
>
<
div
class
=
"item--agerange"
>
<
div
class
=
"agerange-wrap"
>
<
div
data-role
=
"rangeslider"
data-small-step
=
"1"
data-large-step
=
"10"
data-min
=
"1"
data-max
=
"100"
data-bind
=
"value: ageRange, events: { change: vm_onAgeSelectorChange }"
id
=
"panel-filter__agerange"
style
=
"width:160px"
>
<
input
/>
<
input
/>
</
div
>
<
div
class
=
"agerange-title"
>Age Range</
div
>
</
div
>
<
div
class
=
"agerange-btns "
>
<
button
class
=
"button button__gray-outline"
><
span
>Reset</
span
></
button
>
</
div
>
</
div
>
</
script
>
How do I, for example, programatically call the method addRow listed here?
http://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-methods
I can't find it explained anywhere for any of the components...
I need to have a mask in the following format: 0000.00.00 where the dot(.) should not act like a decimal placeholder, even with the clearPromptChar
setted to true and promptChar with " " value, after the field lose his focus the decimal placeholder is shown.
What I need:
If user types: 1234 - Expected: 1234 - Actual: 1234. .
If user types: 12345 - Expected: 1234.5 - Actual: 1234.5 .
Is this feature available in mask option? it exposes any function where i should format by myself?
I have custom event templates in my kendo scheduler, and noticed that in the template, the data variable gives you access to the event and all its fields, and one of them is inverseColor, which lets you know if the color was inversed because the background color of the event was too light/dark.
My issue is, when users base colors on a multi-select, where they can have multiple options selected, I manually change the event background color to the first selected option, otherwise the scheduler doesn't know what to do with multiple colors for one event.
When I manually change the background-color, it breaks whatever is determining inverseColor in the template... So really light colors will have white font (because default color if the scheduler can't find anything to color it is gray, which I set up).
Is there a way to trigger inverse color on event templates so that even if I manually change the background color, it will recalculate that and change the font color accordingly?
columns.Bound(p => p.OrderName).ClientTemplate(
"<
a
onclick
=
'showOrderDetail('
#= OrderName #')'
href
=
'\\#'
>#= OrderName #</
a
>"
).Title("Order Name").Width(150);
<
a
onclick
=
"showOrderDetail("
OrderXYZ')'=""
href
=
"#"
>OrderXYZ</
a
>
Spreadsheet is a nice addition to the Kendo UI framework.
After running the samples and reading the documentation, I could not find a way to lock cells and prevent user changes especially to protect formulas. Frozen rows and columns do not seem to achieve the same. Take the demos and consider the invoice, would you implement it as a spreadsheet if you could not lock the ​tax rate and total?
If there is a way to lock cells, please advise, otherwise please implement before RTM.
Hi,
I have a grid and it has filter with different filterable operators. Now when I click the filter and apply a condition, there is a server side filtering happening and results are shown.
Now when I do a second level filter on a column , I need to restrict the operator of that filterable column. To achieve this ,I need to have a event that is listening the moment I click filter,Since I am on Kendo UI v2016.1.412 , I am unable to use the callback function "filter" or "filterMenuOpen". Can someone help me as how can I register the click event of filter so that i can then add my custom filter operators.
$scope.xx = {
editable : false,
sortable : true,
pageable : {
pageSizes : 1
},
filterable : {
extra : false,
operators : {
string : {
eq : 'Equals to'
}
}
},
scrollable : false,
selectable : true,
columnMenu: true,
columns : [{
field : "xx",
title : translate("xx"),
filterable : true
filterMenuOpen:function(e){
console.log("not triggered");
},
filterMenuInit:function(e){
console.log("not triggered");
},
filter:function(e){
console.log("not triggered ");
}
}, {
field : "xx",
title : 'xx'
filterable : <My custom filter>
}
}
Due to the requirements, I had to implement the grid cells so that some of them are always in edit mode (input) and that the grid will fire an ajax call to the API server whenever user finishes updating cell value.
Here's what I have:
Grid DataSource and event handlers
.Events(e => e
.DataBound("onDataBound")
.DataBinding("onDataBinding")
)
.DataSource(dataSource => dataSource
.Ajax()
.Events(e => e.Change("onDataChange"))
.Read(read => read.Action("action", "controller").Data("GetParams"))
.Model(mod => mod.Id(m => m.id))
.PageSize(100)
)
Click handler (get new data based on currently selected options)
$("#btn").click(function () {
$("#Grid").data("kendoGrid").dataSource.read(GetParams());
}); // end click
onDataChange, onDataBinding and onDataBound
function onDataChange(e) {
if (e.items.length == 1) {
var updatedCell = e.items[0];
var queryString = "?id="+updatedCell.id+"&field="+e.field+"&val="+updatedCell[e.field];
$.ajax({
headers: { 'RequestVerificationToken': '@Html.TokenHeaderValue()' },
success: function (response) {
var resObj = response.toString();
if (resObj == "success") popupNotification.show("Auto Save Success!", "error");
else popupNotification.show("Auto Save Error", "error");
},
fail: function (response) {
popupNotification.show("Auto Save Error", "error");
}
});// end ajax
}
}
function onDataBinding(arg) {
var rows = this.tbody.children();
var dataItems = this.dataSource.view();
for (var i = 0; i < rows.length; i++) {
kendo.unbind(rows[i]);
}
}
function onDataBound(arg) {
var rows = this.tbody.children();
var dataItems = this.dataSource.view();
for (var i = 0; i < dataItems.length; i++) {
var temp = dataItems[i];
if (temp["RecordTypeID"] == 1 || temp["RecordTypeID"] == 3)
{
kendo.bind(rows[i], dataItems[i]);
}
}
generateChart(PopulateSummaryTable());
}
What happens right now is whenever the dataSource.read(GetParams()) gets called for the first time, the following things happen in this particular order:
onDataBinding
onDataBound
onDataChange
which is fine. But if the button is not clicked (which calls dataSource.read(GetParams())), and the user simply edits currently displayed cells, I'm hoping only onDataChange gets called, but it turns out that onDataBinding and onDataBound get called again, and then onDataChange.
Is it possible to prevent onDataBinding and onDataBound from being called more than once?
Please see attached for the UI