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

columns-->filterable-->ui javascript function with columns--> editor javascript function not working

6 Answers 224 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Swatantra
Top achievements
Rank 1
Swatantra asked on 23 Mar 2016, 06:48 PM

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

Sort by
0
Dimiter Topalov
Telerik team
answered on 25 Mar 2016, 12:40 PM
Hello Swatantra,

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
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joe Sugden
Top achievements
Rank 1
answered on 25 Mar 2016, 02:53 PM

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?

0
Swatantra
Top achievements
Rank 1
answered on 25 Mar 2016, 06:39 PM

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

 

 

0
Joe Sugden
Top achievements
Rank 1
answered on 25 Mar 2016, 08:06 PM

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. 

 

0
Joe Sugden
Top achievements
Rank 1
answered on 28 Mar 2016, 09:17 PM
Any help from the telerik folks?
0
Dimo
Telerik team
answered on 29 Mar 2016, 03:26 PM
Hello,

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
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Swatantra
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Joe Sugden
Top achievements
Rank 1
Swatantra
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or