Is it possible to display a helper in a template like this? I'm getting errors. Maybe I'm not formatting it correctly?
columns.Template(template => RenderCustomerActions(template.CustomerID, template.HasMoveHistory));
@helper RenderCustomerActions(int customerID, bool hasMoveHistory)
{
<button type='button' id='openCustomerEditButton' title='Edit Customer' onclick='openCustomerEditWindow(@customerID, false, this);' class='k-button k-button-icon' data-toggle='tooltip'><span class='k-icon k-edit'></span></button>
<button type='button' title='Delete Customer' onclick='deleteCustomer(@customerID, @hasMoveHistory);' class='k-button k-button-icon' data-toggle='tooltip'><span class='k-icon k-delete'></span></button>
<div class="btn-group">
<button type="button" class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown"><i class="fa fa-caret-down"></i></button>
<ul class="dropdown-menu" role="menu">
<li><a onclick="openCustomerPaymentAddWindow(@customerID);">Add Payment</a></li>
</ul>
</div>
}
I've also tried this the dropdown menu will show but it wont expand:
columns.Template(@<text></text>).ClientTemplate("<button type='button' id='openCustomerEditButton' title='Edit Customer' onclick='openCustomerEditWindow(#=CustomerID#, false, this);' class='k-button k-button-icon' data-toggle='tooltip'><span class='k-icon k-edit'></span></button>" +
"<button type='button' title='Delete Customer' onclick='deleteCustomer(#=CustomerID#, #=HasMoveHistory#);' class='k-button k-button-icon' data-toggle='tooltip'><span class='k-icon k-delete'></span></button>" +
"<div class='btn-group'>" +
"<button type='button' class='btn btn-primary btn-xs dropdown-toggle' data-toggle='dropdown'><i class='fa fa-caret-down'></i></button>" +
"<ul class='dropdown-menu' role='menu'>" +
"<li><a onclick='openCustomerPaymentAddWindow(#=CustomerID#);'>Add Payment</a></li>" +
"</ul>" +
"</div>").Title("").Width(100);