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

Get field name in filterable UI javascript function

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jörg Bieri
Top achievements
Rank 1
Jörg Bieri asked on 05 Jun 2013, 12:33 PM
Hi
 
I am using the following syntax to use a the javascript function for adding a dropdown to a filter within a column of a grid:
 
columns: [  
            {
                title: "Typ",
                field: "FileExtension",
                width: 50,
                filterable: {
                    ui: dropDownFilter
                }
            },       
            {
                title: "Titel",
                field: "Title",
                width: 360,
                filterable: {
                    ui: dropDownFilter
                }
            },
 
 
Within the javascript function "typeFilter" I would like to know the column or better the field of the column
to build a javasript function that can work dynamically for several columns.
So is there a way to get the field ("FileExtension") within the javascript function or a way to pass it down to it?
 
function dropDownFilter(element) {
       element.field ?????
}
 
Thanks for your help!
 
Best regards,
 
Pascal Hohensträter

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 07 Jun 2013, 07:46 AM
Hello,

This topic is duplicated.

Regards,
Alexander Valchev
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
Jörg Bieri
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or