Hi,
I have a grid showing several columns like this:
columns.Bound(c => c.WeekNumber).ClientGroupHeaderTemplate("KW: #=value#").Hidden(true); columns.Bound(c => c.Date).Format("{0:dddd dd.MM.yy}") ; columns.ForeignKey(c => c.ThisToSoup, (IEnumerable<EECanteen.Models.FoodItem>)ViewData["Soups"], "ID", "Name").Width(200); columns.ForeignKey(c => c.ThisToMenuOne, (IEnumerable<EECanteen.Models.FoodItem>)ViewData["Menus"], "ID", "Name").Width(200); columns.ForeignKey(c => c.ThisToMenuTwo, (IEnumerable<EECanteen.Models.FoodItem>)ViewData["Menus"], "ID", "Name").Width(200); columns.ForeignKey(c => c.ThisToMenuThree, (IEnumerable<EECanteen.Models.FoodItem>)ViewData["Menus"], "ID", "Name").Width(200); columns.ForeignKey(c => c.ThisToCake, (IEnumerable<EECanteen.Models.FoodItem>)ViewData["Cakes"], "ID", "Name").Width(200); columns.Bound(c => c.Salads).ClientTemplate("#=SaladsTemplate(Salads)#"); columns.Command(command => { command.Destroy(); command.Edit(); }).Width(180);
I want to display a tooltip for the foreign key and for the selected items in the "Salads" column.
And I want to load the data via Ajax using a controller method where I pass the ForeignKey.
Fortunately these Key (also for the Salads) reference the same table in my database.
I also have this ID in my Salads Template which is built like this:
<script type="text/kendo" id="SaladsTemplate"> <strong> #for(var i = 0; i< data.length; i++){# <a title="#:data[i].Name#" data-id="#:data[i].ID#" href="">#:data[i].Name#</a> #}# </strong></script><script type="text/javascript"> var SaladsTemplate = kendo.template($("#SaladsTemplate").html(), { useWithBlock: false });</script>By the way - I want no tooltip on the Date and other columns (not shown here).
Manfred