0

I have created a kendo HierarchicalDataSource

var fontidatasource = new kendo.data.HierarchicalDataSource({
data: vm.get("Source")
});

I want search in it the item that are checked.

I have tried to use a gatherStates function (kendo documentation), but don't function...

4
  • But... how do you check items in a HierarchicalDataSource? Do you mean a kendoTreeView that (of course) uses as data source a HierarchicalDataSource?
    – OnaBai
    Jan 24, 2013 at 12:20
  • In my HierarchicalDataSource there is a voice checked: true or false {checked:true} No i want to see the checked item without the kendotreeview, in kendo treeview i know how do it.
    – Ciccio
    Jan 24, 2013 at 12:28
  • Is that checked part of HierarchicalDataSource? I cannot see any documentation on that. Or do you mean that is a field that you defined on each node of the tree?
    – OnaBai
    Jan 24, 2013 at 12:30
  • Yes is a field defined on each node. { id:.... checke:true, items: [{ id:... checked:false},{id... checked:true}]}
    – Ciccio
    Jan 24, 2013 at 12:34

1 Answer 1

0

I'm afraid that there is not such filtering option for HierarchicalDataSources.

You might try this answer even that it says TreeView it applies here since the data model is the same.

9
  • There is a way to make a loop to iterate through the HierarchicalDataSources?
    – Ciccio
    Jan 24, 2013 at 13:43
  • If you don't mind too much about memory: write your own recursive function?
    – OnaBai
    Jan 24, 2013 at 15:42
  • I try to write it but it tell error.. if you want to help me.
    – Ciccio
    Jan 25, 2013 at 10:41
  • I would need to know more exactly what should be the output of the function, the id, the elements without items, a reference to found elements...
    – OnaBai
    Jan 25, 2013 at 10:45
  • Json example: [{ id: "id", checked: true, items: [{ id: "id", checked: true, items:[]}, {id: "id", checked: true, items:[]}] }] I want to do an action when an element have cheched:true The tree can have more level...
    – Ciccio
    Jan 25, 2013 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.