Home > Technical > Example of Bootstrap Dropdown menu in Kendo Grid

Example of Bootstrap Dropdown menu in Kendo Grid

August 21st, 2015

After some trial and error I got a bootstrap dropdown menu working in a Kendo grid using code like this:

<blockquote>columns.Bound(theitem => theitem.ID).ClientTemplate
(“<a href=’/” + @”\#” + “/Items/Items_Update/” + “#=ID#” + “‘ class=’btn btn-xs btn-info’ rel=”nofollow”><i class=’icon-pencil’></i></a> ” +
“<div class=’btn-group’>” +
“<button type=’button’ class=’btn btn-default btn-xs dropdown-toggle’ data-toggle=’dropdown’>+<span class=’caret’></span></button>” +
“<ul class=’dropdown-menu dropdown-menu-right pull-right’ role=’menu’>” +
“<li role=’presentation’><a role=’menuitem’ tabindex=’-1′ href=’/” + @”\#” + “/Items/Items_Update/” + “#=ID#” + “‘ rel=”nofollow”>Edit</a></li>” +
“<li role=’presentation’ class=’divider’></li>” +
“<li role=’presentation’><a role=’menuitem’ tabindex=’-1′ href= ” onclick=’window.open(\”Items/OutputPDF/” + “#=ID#” + “\”” + “,\”_blank\”);return false;’ rel=”nofollow”>Download</a></li>” +
“</ul>” +
“</div>”
).Filterable(false)
</blockquote>

Now, I can show a Kendo grid/ list and have a dropdown menu on each row in the grid that I can use to take actions on grid items.

  1. No comments yet.
  1. No trackbacks yet.