Hi,
I am using kendo grid column editor function to display dropdown for some of grid columns while editing. Also I am using columns--> filterable--> ui to provide another javascipt function for custom filter implementation.
My columns--> editor function is :
function editableDropDown(container, options){
$('<input data-bind="value:' + options.field + '" />')
.appendTo(container)
.kendoDropDownList({
dataSource: {
data: options.values
}
});
}
My columns--> filterable-->ui function is : function createmyFilter(){....}
I am creating column config from server and passing dropdown selectable items to values property from server.
The issue is that createmyFilter is not being hit for the columns where I have dropdown function implemented. If I don't pass columns.values from server. The createmyFilter function is hit, but then I don't see dropdown values while editing the field.
Can you please help me find the solution.
Thank you,
-Swatantra
6 Answers, 1 is accepted
You can check out the following demo of a Kendo UI DropDownList used as an editor template for one of the Grid columns, and apply the necessary adjustments to your implementation:
http://demos.telerik.com/kendo-ui/grid/editing-custom
I hope this helps.
Regards,
Dimiter Topalov
Telerik
Hello,
I think the problem Swatantra is stating is not that the custom edtiable dropdown in the row is not working properly. The problem is that when a custom editable is set, the default filtering on this column doesn't work.
I have a similar setup where the custom editable dropdown on the column is working fine but when you try to filter on the column it doesn't work.
Dimter can you provide an example like the one above but with a working filter?
Hi Joe,
Thank you for explaining the issue.
Yes, that is what I am facing currently and it would be great if we can see an example of both the features working together for same column.
Thank you,
Swatantra
I have recreated the issue in one of your examples, please take a look at: http://dojo.telerik.com/ETUhO/3
On the Category coloumn, which has the custom editor template with a dropdown I tried to add in the custom filter using the "ui" parameter. But nothing gets applied when you run.
There are two problems with the provided example http://dojo.telerik.com/ETUhO/3:
- the categoryFilter function is defined as a value of columns.ui, while it should be defined as a value of columns.filterable.ui.
- the dataTextField and dataValueField of the custom filtering DropDownList are defined inside the widget's dataSource configuration, while they should be defined outside it
At this point both the custom editor and the custom filter widget will initialize correctly, however, filtering on object values is not supported out-of-the-box, so I hope the above example does not reflect the actual application scenario.
Regards,
Dimo
Telerik