How to filter a server-side mvvm based dropdowntree widget

1 Answer 14 Views
DropDownTree MVVM
Frank
Top achievements
Rank 1
Iron
Frank asked on 07 Jan 2025, 03:21 PM

We need in our application a dropdowntree which has the following properties:

  • searchable
  • mvvm based
  • server-filterered

the following snipped is the configuration of the datasource:

let hDataSource = new kendo.data.HierarchicalDataSource({
	transport: {
		read:
			function (options) {
				let searchString = "";
				if (options.data.filter && options.data.filter.filters.length > 0) {
					searchString = "/" + options.data.filter.filters[0].value;
				}
				let url = SERVICE_URL;
				if (searchString) {
					url += searchString;
				}
				$.ajax({
					url: url,
					success: function (result) {
						options.success(result);
					}
				});
			}
	},
	schema: {
		model: {
			children: "items",
			hasChildren: "childsAvailable"
		}
	},
	serverFiltering: true
});

the url provided by the SERVICE_URL variable is filtering the data when searching for nodes

when i configure the widget in the normal way everything works just fine. But when i use mvvm the browser throws the following error.

maybe somebody can help me get mvvm to work since this is how all our forms are created.

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 10 Jan 2025, 08:02 AM

Hello Frank,

Currently, DropDownTree does not support server filtering. There is such a Feature request logged in our official Feedback Portal and I would recommend to a cast a vote for the idea.

- https://feedback.telerik.com/kendo-jquery-ui/1362890-dropdowntree-server-filtering

Based on the popularity the issue gains in the community it could be considered for future implementation.

 

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DropDownTree MVVM
Asked by
Frank
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
Share this question
or