Reputation: 664
I am trying to display tooltip for the column menu in the kendo UI grid. I have defined like
$(".k-header-column-menu").kendoTooltip({
content: "column menu"
});
but it is not displaying any tooltip. can any one help me how to give the tooltip for column.
Upvotes: 1
Views: 10678
Reputation: 40887
The problem is not your code but when you run it. If you do it just after initializing the grid, the grid menu still does not exist and then you are not defining the Tooltip
. Run that code in the Grid
dataBound
event.
Example:
$("#grid").kendoGrid({
dataSource: {
data : createRandomData(300),
pageSize: 10,
schema : {
model: {
fields: {
Id : { type: 'number' },
FirstName: { type: 'string' },
LastName : { type: 'string' }
}
}
}
},
columnMenu: true,
columns : [
{ field: "FirstName", width: 90, title: "First Name" },
{ field: "LastName", width: 90, title: "Last Name" }
],
dataBound: function () {
$(".k-header-column-menu").kendoTooltip({
content: "column menu"
});
}
});
Upvotes: 3