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

How to use filterable-ui attribute in TreeList with Vue

3 Answers 90 Views
This is a migrated thread and some comments may be shown as answers.
Wei
Top achievements
Rank 1
Wei asked on 30 Nov 2018, 04:06 AM

I'm using TreeList component and I want to rend dropdown list in column filters, I have set filterable to true and filterable-ui to rend function, but still failed, while it works in jquery TreeList. Failed meaning is rending default string type filters, not dropdown list. And I'm sure the attribute is received by component from vue chrome plugin.

Hoping some demoes to show how to work fine.

 

Code as following

HTML:

<kendo-treelist :data-source="resourceDataSource"
:filterable="true">
<kendo-treelist-column :field="'name'" :width="140"></kendo-treelist-column>
<kendo-treelist-column :field="'resourceType'" :width="100" :filterable="true" :filterable-ui="resourceTypeFilterableUi" :template="typeTemplate"></kendo-treelist-column>
</kendo-treelist>

 

JS:

resourceDataSource:

new kendo.data.TreeListDataSource({
serverPaging:true,
serverFiltering:true,
transport:{
read:{
url:'/api/RBAC/Resource/GetResouceListByTid',
type:"post",
dataType:'json',
data:{
companyId:vm.companyId
}
}
},
page:1,
pageSize:10,
schema: {
model: {
id: "id",
parentId: "parentId",
fields:{
resourceType:{ type:'string' }
}
},
data:function (res) {
return res.data.data
},
total:function (res) {
return res.data.total
}
}
})

 

Rend Function:

resourceTypeFilterableUi:function(element){
element.kendoDropDownList({
dataSource: resourceType,
dataTextField: "value",
dataValueField: "id"
})
}

 

 

 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 03 Dec 2018, 11:30 AM
Hi,

I have created a simple example where the filterable-ui worked correctly at my side - the thing that I changed was to set a resourceDataSource to the dataSource of the DropDownList. Please review it and let me know if you have further questions.

Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wei
Top achievements
Rank 1
answered on 04 Dec 2018, 05:12 AM

Thanks for replay.

Now I do rend the dropdownList, while how can I remove the logic dropdownList ( to choose and/or ) and the second dropdownList?

I try to remove them by select them though element argument from callback with jquery, but it seem can not get them successfully.

 

 

0
Plamen
Telerik team
answered on 05 Dec 2018, 03:13 PM
Hi,

it is not quite clear what you are trying to achieve would you please elaborate it a little bit by providing an image of the desired behavior and the exact steps to replicate the unwanted behavior so we could inspect it deeper.

Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Wei
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Wei
Top achievements
Rank 1
Share this question
or