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

get a name of the column

4 Answers 20 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bruno
Top achievements
Rank 1
Bruno asked on 31 Jan 2020, 02:18 PM

Hi,

 

I have a dojo for my problem : https://dojo.telerik.com/oJiJEFoW/2

I would like to be able to display the title of the column (as in the screen) just above the search bar in my filter by selection.

 

I hope I have been understandable, thank you in advance to you!

4 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 04 Feb 2020, 09:26 AM

Hi Bruno,

If you would like to add the column title in the filter of the column menu, I would recommend adding a new HTML div element before the container that holds the filter. Within the columnMenuInit event, execute the following logic:

          columnMenuInit:function(e){
            var title = $("th[data-field='"+e.field+"']").attr("data-title");
            $(e.container).find(".k-filter-menu-container").before("<div>"+title+"</div>")
          },

Check out the modified Dojo sample at:

https://dojo.telerik.com/EPIsOZOQ

 

Regards,
Tsvetomir
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Bruno
Top achievements
Rank 1
answered on 05 Feb 2020, 10:06 AM

Hi Tsvetomir,

 

I don't use menu column that's why I realized that it didn't work.

Do you have a technique under this model for Company Name for example : https://dojo.telerik.com/EPIsOZOQ/4

 

Thanks you !

0
Tsvetomir
Telerik team
answered on 05 Feb 2020, 01:38 PM

Hi Bruno,

Thank you for specifying that the column menu is not utilized but rather the plain filter menu. All that you would have to change is the event in which the logic is executed - filterMenuInit:

          filterMenuInit: function(e){
            alert(e.field);
            var title = $("th[data-field='"+e.field+"']").attr("data-title");
            $(e.container).find(".k-filter-menu-container").before("<div>"+title+"</div>")
          },

 

Regards,
Tsvetomir
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Bruno
Top achievements
Rank 1
answered on 05 Feb 2020, 02:10 PM
Perfect, thanks you !
Tags
Grid
Asked by
Bruno
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Bruno
Top achievements
Rank 1
Share this question
or