This is probably a really ignorant question but I'm trying to make my Popup Editor Template 4 columns wide vs the default 2. I have looked at this --> custom-popup-editor and this -->Forum Search
Ideally I could use Bootstrap to setup that template however I wish but I cannot get the very basic `<div class="row"> <div class="col-md-4">` to work. I am currently looking at this --> Kendo and Bootstrap Docs to try and make that work.
At the end of the day I just need to be able to make my Popup Editor 4 columns wide(i.e. label - editor - label - editor) Don't care how I get there.
This is my Editor Template, _Staff.cshtml, and below that is the Index.cshtml that has the Grid that calls it.
@model MyApp.Models.StaffViewModel
@Html.HiddenFor(m => m.StaffID)
<
div
class
=
"row"
>
<
div
class
=
"col-lg-2"
>
@Html.LabelFor(m => m.GPEmployeeID)
</
div
>
<
div
class
=
"col-lg-4"
>
@Html.EditorFor(m => m.GPEmployeeID)
@Html.ValidationMessageFor(m => m.GPEmployeeID)
</
div
>
<
div
class
=
"col-lg-2"
>
@Html.LabelFor(m => m.FirstName)
</
div
>
<
div
class
=
"col-lg-4"
>
@Html.EditorFor(m => m.FirstName)
@Html.ValidationMessageFor(m => m.FirstName)
</
div
>
</
div
>
@(Html.Kendo().Grid<
MyApp.Models.StaffViewModel
>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.GPEmployeeID);
columns.Bound(c => c.UserID);
columns.Bound(c => c.LastName);
columns.Bound(c => c.FirstName);
columns.ForeignKey(c => c.PrimaryCountyID,(System.Collections.IEnumerable)ViewData["Counties"],"CountyID","CountyName");
columns.Bound(c => c.WorkPhone);
columns.Bound(c => c.WorkEmail);
columns.ForeignKey(c => c.OfficeID,(System.Collections.IEnumerable)ViewData["Offices"],"OfficeID","OfficeName");
columns.ForeignKey(c => c.StaffTypeID,(System.Collections.IEnumerable)ViewData["StaffTypes"],"StaffTypeID","StaffType");
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(110);
})
.ToolBar(toolbar => {
toolbar.Create();
})
.ColumnMenu()
.Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("_Staff"))
.Pageable()
.Groupable()
.Sortable(sortable => {
sortable.SortMode(GridSortMode.SingleColumn);
})
.Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
.Scrollable(scrollable => scrollable.Enabled(false))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.StaffID);
model.Field(p => p.StaffID).Editable(false);
})
.Read(read => read.Action("tblStaffExtendeds_Read", "TStaff"))
.Create(create => create.Action("tblStaffExtendeds_Create", "TStaff"))
.Update(update => update.Action("tblStaffExtendeds_Update", "TStaff"))
.Destroy(destroy => destroy.Action("tblStaffExtendeds_Destroy", "TStaff"))
)
)