I have a form split into sections, and within one of the sections I have a TextArea, which I want to render as the full width of the form - even when I suppress the label text, the container and spacing is still rendered and so I lose a chunk of space to the left of the text area (horizantal form layout)
My form code :@(
Html.Kendo().Form<Customer>()
.Name("detailForm")
.HtmlAttributes(new { action = @Url.Action("EditCustomer", "Customer"), method = "POST" })
.Orientation("horizontal")
.Items(items =>
{
items.AddGroup()
.Label("Information")
.Layout("grid")
.Grid(g => g.Cols(2).Gutter(10))
.Items(i =>
{
i.Add()
.Field(f => f.CompanyName)
.Label(l => l.Text("Company Name:").Optional(false));
i.Add()
.Field(f => f.CustomerStatusId)
.Label(l => l.Text("Status:").Optional(false))
.Editor(e =>
{
e.DropDownList()
.HtmlAttributes(new { })
.DataTextField("KeyDescription")
.DataValueField("KeyValue")
.HtmlAttributes(new { style = "width:100%" })
.Size(ComponentSize.Small)
.FillMode(FillMode.Outline)
.DataSource(source =>
{
source.Read(read =>
{
read.Action("LookupValues", "Lookup", new { type = "CustomerStatus" });
})
.ServerFiltering(true);
});
});
});
items.AddGroup()
.Label("Description")
.Items(i =>
{
i.Add()
.Field(f => f.Description)
.Label(l => l.Text(" "))
.Editor(e =>
{
e.TextArea()
.Size(ComponentSize.Small)
.Overflow(TextAreaOverflow.Scroll)
.Rows(8);
});
});
})
)
I have tried using the EditorTemplateHandler but that still seems to render the label section?
Thanks