This is a migrated thread and some comments may be shown as answers.

Filter datasource and bind result to treeview

0 Answers 125 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Monish
Top achievements
Rank 1
Monish asked on 01 Oct 2012, 02:14 PM
Hi,

I am trying to filter the datasource based on the selection on the grid and populate the treeview.
I am able to filter the data source using the filter property. As this returns Observable objects, I am not able to bind the treeview. In fact, if I mention the datasource of the treeview to this result (which is observable object) nothing happens.

I even tried using query (as shown below) but still no success to bind the treeview
var dsFilter = [{ field: "id", operator: "eq", value: selectedItem.BaseObjId}];

var query = new kendo.data.Query(dataSource);
var data = query.filter(dsFilter).data;

Let me know if I am missing anything or any better approach to do the same?

Thanks…

Regards,
Monish.

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Monish
Top achievements
Rank 1
Share this question
or