Hi
We are working with the Kendo UI and are quite new to MVVM. We were trying out the following scenario and came across an issue which is as below.
We have a checkbox list on our page along with 2 listboxes (say listbox1 and listbox2).
The checkboxlist is a consolidated list of all the items from both the ListBoxes. Initially when no items are checked on the checkboxlist, all the items appear on the listbox1. The items when checked on the checkboxlist should move to listbox2 and should be removed from listbox1.
There is also a textbox and button ['Add Item'] using which we can add values to listbox1 (correspondingly these will appear as unchecked on the checkboxlist).
The problem:
The viewModel does not get refreshed on the check and uncheck events of the checkboxes. Because of this, the listboxes do not get updated with their respective items.
However the viewModel refreshes the listboxes when a new item is added using the textbox and 'Add Item' button.
Please follow the JSFiddle link for code reference: http://jsfiddle.net/umeshkrishna/eqWK2/9/
I am also attaching screen- shots as aides.
Looking forward to a speedy reply.
Thanks
Umesh
, change :
function
() {
var
grid =
this
;
grid.select().each(
function
() {
grid.collapseRow(grid.tbody.find(
"tr.k-master-row"
));
grid.expandRow(grid.tbody.find(
"tr.k-state-selected"
));
});
}
_footer:
function
() {
var
that =
this
,
aggregates = that.dataSource.aggregates(),
html =
""
,
footerTemplate = that.footerTemplate,
options = that.options;
if
(footerTemplate) {
html = $(that._wrapFooter(footerTemplate(aggregates || {})));
if
(that.footer) {
var
tmp = html;
that.footer.replaceWith(tmp);
that.footer = tmp;
}
else
{
if
(options.scrollable) {
that.footer = options.pageable ? html.insertBefore(that.wrapper.children(
"div.k-grid-pager"
)) : html.appendTo(that.wrapper);
//CHANGE: Have scroll event move .k-grid-footer-wrap
var
scrollables = that.footer.children(
'.k-grid-footer-wrap'
);
that.content.bind(
'scroll'
,
function
() {
scrollables.scrollLeft(
this
.scrollLeft);
});
}
else
{
that.footer = html.insertBefore(that.tbody);
}
}
}
},
_wrapFooter:
function
(footerRow) {
var
that =
this
,
html =
""
,
columns = that.columns,
idx,
length,
groups = that.dataSource.group().length,
column;
if
(that.options.scrollable) {
//CHANGE: Add extra div with .k-grid-footer-wrap
html = $(
'<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table cellspacing="0"><tbody>'
+ footerRow +
'</tbody></table></div></div>'
);
that._appendCols(html.find(
"table"
));
return
html;
}
return
'<tfoot>'
+ footerRow +
'</tfoot>'
;
},
$(document).ready(function () {
$("#autoComplete").kendoAutoComplete({
minLength: 2,
dataTextField: "LastName",
dataValueField: "NetworkId",
template: '<
img
src
=
""
> <
h3
> ${data.LastName} ${data.FirstName} </
h3
> ${data.Office}',
dataSource: new kendo.data.DataSource({
severFiltering: true,
serverPaging: true,
transport: {
read: {
// the remote service URL
url: "http://localhost:8080/EmployeeService.svc/employees?callback=?",
// JSONP is required for cross-domain AJAX
dataType: "jsonp",
// additional parameters sent to the remote service
data: {
filter: function () {
return $("#autoComplete").data("kendoAutoComplete").value();
}
}
}
}
}),
change: function () {
this.dataSource.read();
}
})
});
$(document).ready(function () {
$("#mtdSales").kendoRadialGauge({
gaugeArea: {
background: "green",
border: {
color: "black",
width: "1"
},
height: "200px" //// <--- Here's the issue
},
pointer: {
value: 324436.84,
color: "#CECEFF"
},
scale: {
minorUnit: 50000,
majorUnit: 50000,
startAngle: -30,
endAngle: 210,
max: 500000,
labels: {
position: "inside",
color: "white"
},
ranges: [
{
from: 0,
to: 250000,
color: "#CECEF0"
}, {
from: 250000,
to: 375000,
color: "#c20000"
}, {
from: 375000,
to: 450000,
color: "#ffc700"
}, {
from: 450000,
to: 500000,
color: "#006400"
}
]
}
});
});
If I want to compile my app to run as native on IOS and Android using phonegap (and not run it remotely from a web site), which parts of the Kendo Suite can I use?
Is it just the Kendo mobile functionality? Or can I use other widgets from the other parts of the suite?
Many Thanks
Matt