It appears setting the Expanded property in the ItemDataBound event doesn't work. Is that correct? What options do I have?
For example: Setting item.Expanded doesn't appear to do anything. (I verified IsExpanded is true in my models)
@(Html.Kendo().TreeView() .Name("TestTree") .ExpandAll(false) .BindTo(Model.Items, mappings => { mappings.For<MyModelClass>(binding => binding.ItemDataBound((item, child) => { item.Text = child.Name; item.Selected = child.IsSelected; item.Expanded = child.IsExpanded; }) .Children(x => x.ChildItems) ); }) )All of our CRUD via inline grid / popups are being are being followed by a full read of the datasource to keep things in synch (please see sample transport code).
I know this full refresh of the datasource is not necessary. I am trying to understand what is required :
1) Following a successful deletion do I need to delete a row from the grid and datasource and how?
2) Following a successful update do I need to set reset dirty flags to false? Anything else?
3) Following a successful insert how do return extract new key id value and use to synch grid and datasource ?
transport:
{
read: function (options) {
$.ajax({
url: siteUrlRel + "/Handlers/GenericHandler.aspx?sp=sp_getAddresses",
dataType: "json",
type: "GET",
cache: false,
contentType: "application/json; charset=utf-8",
success: function (result) {
options.success(result);
}
});
},
create: function (options) {
$.ajax({
url: siteUrlRel + "/Handlers/GenericCRUDHandler.aspx?sp=sp_addAddress",
data: encodePlus(kendo.stringify(options.data)),
dataType: "json",
async: false,
type: "POST",
success: function (response) {
addressesDataSource.read();
},
error: function (response) {
alert(response);
addressesDataSource.cancelChanges();
}
});
},
update: function (options) {
$.ajax({
url: siteUrlRel + "/Handlers/GenericCRUDHandler.aspx?sp=sp_updateAddress",
data: encodePlus(kendo.stringify(options.data)),
async: false,
dataType: "json",
type: "POST",
success: function (response) {
addressesDataSource.read();
UpdateMessage("Addresses changes applied");
}
});
},
destroy: function (options) {
$.ajax({
url: siteUrlRel + "/Handlers/GenericCRUDHandler.aspx?sp=sp_deladdresses",
data:encodePlus(kendo.stringify(options.data)),
async: false,
type: "POST",
success: function (response) {
addressesDataSource.read();
},
error: function (response) {
alert(response.responseText);
addressesDataSource.cancelChanges();
}
});
},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return { models: kendo.stringify(options.models) };
}
}
},

I am trying the following code to change the border bottom color of an 'li' element in a list-view
http://dojo.telerik.com/ApIp/27
It does not work
Could you please let me know what's the issue ?
There's probably a simple way to do this but I'm darned if I can figure out what.
I want to build a stacked bar chart roughly similar to the example at http://demos.telerik.com/kendo-ui/bar-charts/stacked-bar. The chart will show the top-N user activity per day. So for today, let's say that Alice did 100 units of work, Bob did 75, and Carole did 82. I want the stack to reflect that. Yesterday Mike did 75, Alice did 84, and Eve did 84.
I'm having a hard time figuring out how to get the stacks to reflect my data. Basically what I want is a stack for each day, with each "slice" of the stack showing activity. All of the Kendo chart types seem to assume that you'll have the same stacks every day, e.g. that every day I want to show what Alice, Bob, and Carole did. What I actually want is to show a stack per day where the components of the stack show (and the tooltip reflects) whatever the most active users for that day did. The same users may be most-active on multiple days but they may not.
Is there a straightforward way to do this with the built-in chart types?
Hi,
I have some Kendo mobile buttons, and outside a Kendo grid they're style is as expected (ie. with "km-button" classes and data-icon="compose").
However when I put them into a grid (via an MVVM data-row-template), they change/lose their icons and style. Clearly this is because, being in the grid, they're inheriting from a kendo (k) class of the grid - and this overrides their kendo mobile (km) class.
Is there a easy way to render buttons in their kendo mobile form within a grid? Or somehow tell the grid to "act mobile"?
Many thanks
- Paul
(I see in the kendo mobile demo grid here: https://demos.telerik.com/kendo-ui/m/index#grid/adaptive that most of its contents are rendered with Kendo (k) classes. Perhaps this means the grid excludes or does not support content with "km" classes?)
Hello,
I'm trying to export some columns in a grid without hiding them. Now I'm using something like this:
var $grid = $('#grid').data('kendoGrid');
for(var i=0; i<columnsthatIdontneed.lenght;i++){
$grid.hideColumn(columnsthatIdontneed[i]);
}
$grid.saveAsExcel();//or $grid.saveAsPDF();
for(var i=0; i<columnsthatIdontneed.lenght;i++){
$grid.showColumn(columnsthatIdontneed[i]);
}
I need a solution for export without hiding those columns.
Thanks.
Hi,
Is it possible to create a drop down list always open (like html element select with attribute size) ?
Thanks,
Matthieu

is it possible to use the different chart icons as it is done in the demos
<span class="sparklineIcon"></span>
<span class="chartBarIcon"></span>
<span class="chartPieIcon"></span>
...
Where can i find the styles?
Thx in advance
