Example of Bootstrap Dropdown menu in Kendo Grid

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>” +

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>