Hi,
Is it possible to bind a ListView to a collection of HTML elements?
If items is an ObservableArray of <li> elements, what goes into the template? Or is a template necessary?
<script id="li-template" type="text/x-kendo-template">
???? WHAT GOES HERE if items is a collection of <li> elements
</script>
<ul id="documentsList" data-role="listview" data-bind="source: items" data-template="li-template"></ul>
Incidentally, the reason the items collection contains HTML elements (<li>) rather than data objects is because the list-items wrap Seadragon.Viewer objects. The constructor for a Seadragon.Viewer object takes a container HTML element as its parameter. At this point, Iām merely exploring ways to convert this section of code to an MVVM approach using declarative bindings. Toward that end, binding to the ObservableArray of <li> elements would be a first step. But if there is a better approach ā I suspect there is ā then I would certainly like to hear about it.
Thanks!Hi there,
I have an issue with the stock browser on the Samsung tab 10.1 whereby the device renders what looks to be a native textview over the html input tag when it receives focus. When receiving focus the popover and modalviews both close immediately. The popop or modalview do not close when not using the splitview.
See these videos.
Working without splitview
http://sdrv.ms/13i1Blz
Closing immediately with splitview
http://sdrv.ms/13i1CpE
I am using the modalview index.html directly from your samples. With the splitview/modalview page, I have dropped the Modalview code into the splitview index.html. See attached
I do not experience this problem on the google nexus 7 tablet using chrome.
Side Note: Would you happen to know whether I can disable this rendering behaviour on this Samsung device? I have noticed other Samsung specific UX behaviour in the browser, in particular drop down select lists draw completely different, so turning this off would be ideal.
Given its only happening via the splitview, i suspect it could be fixed/addressed by your product, if not, are you able to provide an explanation as to what order of focus/hide events could be happening on this tablet that makes the browser behave like it is which I can then pass onto a ticket with Samsung.
Thanks.$(
"#combobox"
).kendoComboBox({
dataTextField:
"Name"
,
dataValueField:
"ID"
,
dataSource: {
type:
"json"
,
transport: {
read: {
url:
"..."
,
contentType:
"application/json;"
,
dataType:
"json"
,
data: {
name:
function
() {
return
$(
"#combobox"
).val();
}
}
}});
var
objectListDataSource =
new
kendo.data.DataSource( {
transport: {
read:
function
( options ) {
$.ajax( {
url:
'/default/GetUsers'
,
type:
'POST'
,
dataType:
'json'
,
data: { ids: ids },
traditional:
true
,
success:
function
( data ) {
options.success( data );
}
} );
}
},
schema: {
data:
'items'
,
model: {
id:
'ID'
,
fields: {
ID: { type:
"Number"
, editable:
false
, nullable:
false
, validation: { required:
false
} },
UserName:
"UserName"
}
}
}
} );
$(
'#objectList'
).kendoListView( {
dataSource: objectListDataSource,
template:
'<li>${ DisplayName }<div class="separator">|</div></li>'
,
selectable:
'single'
,
change:
function
() {
//alert( "CHANGE" );
},
dataBound:
function
() {
//alert( "dataBound" );
}
} );
var
myDS = $(
'#objectList'
).data(
"kendoListView"
).dataSource;
ids.push( 50 );
ids.push( 45 );
myDS .read();