I want to give something a data-target value in my grid results. I used a client template to achieve this but I cannot give the data-target an identifier, as soon as I type data-target=''#mymodal' the system crashes and the grid breaks and fails to load. Is there anyway to include a # in my client template that won't breakt he grid?
@(Html.Kendo().Grid<
Kendo_Range_Test.ViewModels.VesselViewModel
>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(c => c.owner_company);
columns.Bound(c => c.vessel_status);
columns.Command(command => { command.Edit(); }).Width(180);
columns.Bound(c => c.vessel_idx)
.ClientTemplate(
"<
a
href
=
'" + Url.Action("Create", "Fixture") + "/#=vessel_idx #'
" + ">Fixture</
a
>");
columns.Bound(c => c.vessel_idx)
.ClientTemplate(
"<
a
data-toggle
=
'modal'
data-target
=
'#myModal'
href
=
'" + Url.Action("Create", "Fixture") + "/#=vessel_idx #'
" + ">Details</
a
>");
}
)
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Reorderable(reorder => reorder.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(40)
.Model(model =>
{
model.Id(p => p.vessel_idx);
})
.Read(read => read.Action("vessels_Read", "BrokerHome"))
.Update(update => update.Action("vessels_Update", "BrokerHome"))
)
)
Thanks