Hi,
What is the most efficient way to update the map layer datasource? For this map I use a url I'd like updated (because a get parameter changes).
I read this: http://d585tldpucybw.cloudfront.net/forums/change-marker-layer%27s-data-source
But it's outdated, currently there is no more _initDataSource() and the setDataSource() did find its way to the layer object but I can't get it to work:
don't find an example for it.
also, I tried:
var
layer = $(
"#selectionMap"
).data(
"kendoMap"
).layers[0];
layer.dataSource.transport ={read:$scope.baseUrl+
"/MapStatistics"
+
"?countryvar="
+$scope.ui.subSelections.countryVar};
layer.reset();
Also tried this:
layer.setDataSource({type:
"geojson"
,transport: {read:$scope.baseUrl+
"/MapStatistics"
+
"?countryvar="
+$scope.ui.subSelections.countryVar}})
Error: this.dataSource.unbind is not a function
So my question: Is there an efficient way to do this so the map is reloaded on layer url update?
thanks,
Arno
GroupFooterTemplate works during load, but after removing the age from header and readding, the grid crashes.
Any suggestions?
Example in following link.
If I have a video in only two formats (ogg and webm), can I add both as sources and have the media player automatically detect which one to use? Or do I need to do the necessary browser checks before adding the source to the player?
Hello All
I was going through the example below and I would like to know how I could enable filtering on the grid that was initialized from a HTML table.
https://demos.telerik.com/kendo-ui/grid/filter-row
In my case the data source for the grid is not odata. I would like to enable filtering for the below example:
https://demos.telerik.com/kendo-ui/grid/from-table
Any pointers would be appreciated!
Thanks.
Vijhay Devarajan.
Hello
I am trying to save PivotGrid state for future load.But I have a problen: The expand property of row items is not changed at run time. Test here https://dojo.telerik.com/@Mzand/obIkEdAY : When the user expands an item at runtime the expand property of the returned row by dataSource.rows() is the same as what it was at initialization. Isn't it data-binded? Is there a way to get the value?
It is easy to add style to grid column cells with https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.attributes
How can I style the groupFooterTemplate?
Example here:
Hiya,
I was trying to hide the expand/collapse column and use the row click to expand/collapse the row detail instead. I was able to implement each individually but when I combine them the row click is no longer working.
I use the following to hide the expand/collapse column in the DataBound event:
$(
".k-hierarchy-cell"
).remove();
$(
".k-hierarchy-col"
).remove();
And something like the following to implement the row click to expand the row detail:
element.on(
'click'
,
'tr'
,
function
(){
$(element).data().kendoGrid.expandRow($(
this
));
})
Did I miss anything?
Cheers,
Byang
Hi all,
I'm currently trying to implement an MVC grid which contains a multi select editor template. In the DB it's stored as a comma separated list of strings, but I wish to display it as a multi select (to help the user input data) so i changed my viewmodel property to a list of a custom model. I've attempted this myself, but it doesn't appear to be posting to my controller action. If i add items, they appear to add to the datasource but dont post to the controller (come through as "nothing"), however, if i add 3 items, then remove one using the X
My bound column
columns.Bound(
Function
(cond) cond.Value).EditorTemplateName(
"MyTemplate_Value"
)
My customer object
Public
Class
TheValue
Public
Property
MyValueID
As
String
Public
Property
MyValue
As
String
End
Class
My Editor Template
@Html.Kendo().MultiSelectFor(
Function
(m) m).DataTextField(
"MyValue"
).DataValueField(
"MyValueID"
).Events(
Sub
(ev) ev.DataBound(
"MultiSelect_DataBound"
))
<style>
#Value-list {
display: none !important;
}
</style>
My javascript
var
currentId = 1;
function
MultiSelect_DataBound(e) {
$(
'.k-multiselect .k-input'
).unbind(
'keyup'
);
$(
'.k-multiselect .k-input'
).on(
'keyup'
, onClickEnter);
}
function onClickEnter(e) {
if (e.keyCode === 13) {
var widget = $('#Value').getKendoMultiSelect();
var dataSource = widget.dataSource;
var input = $('.k-multiselect .k-input');
var value = input.val().trim();
if (!value || value.length === 0) {
return;
}
var newItem = {
MyValueID: currentId++,
MyValue: value
};
dataSource.add(newItem);
var newValue = newItem.MyValueID;
widget.value(widget.value().concat([newValue]));
}
}
Any help would be appreciated!