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
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
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 !
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