Provide custom data source and enabling filtering to drop down list in JavaScript Treegrid control

18 Nov 20181 minute to read

You can provide data source to the DropDownList by using the params of columns.edit property.

While setting new data source using edit params, you must specify a new query property for the DropDownList as follows,

      edit: {
        params: {
          actionComplete: () => false,
          allowFiltering: true,
          dataSource: new DataManager(priorityData),
          fields: { text: "priorityName", value: "priorityName" },
          query: new Query()
        }
      }

You can also enable filtering for the DropDownList by passing the allowFiltering as true to the edit params.

In the below demo, DropDownList is rendered with custom dataSource for the Priority column and enabled filtering to search DropDownList items.

You can refer to our JavaScript Tree Grid feature tour page for its groundbreaking feature representations. You can also explore our JavaScript Tree Grid example JavaScript Tree Grid example to knows how to present and manipulate data.