Hi,
I use Kendo UI ASP.NET MVC with VB.NET. My question is:
How I can define the width for the @Html.EditorFor() width css?
SampleView.vbhtml
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1)
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
I tried to define a css style like this:
Site.css
#small-editfor
{
width:30px;
border-bottom-left-radius:0px;
border-bottom-right-radius:0px;
border-top-left-radius:0px;
border-top-right-radius:0px;
}
SampleView.vbhtml
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1,Nothing, "small-editfor",Nothing)
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
With this solution I see the width
30px, but the value of the property Tel1 would’t be available on the server.
I tried this also without success:
SampleView.vbhtml
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1 New With { .class=”small-editfor”})
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1 New With { .style=”width:30px”})
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
Does anyone have an idea?
I use Kendo UI ASP.NET MVC with VB.NET. My question is:
How I can define the width for the @Html.EditorFor() width css?
SampleView.vbhtml
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1)
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
I tried to define a css style like this:
Site.css
#small-editfor
{
width:30px;
border-bottom-left-radius:0px;
border-bottom-right-radius:0px;
border-top-left-radius:0px;
border-top-right-radius:0px;
}
SampleView.vbhtml
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1,Nothing, "small-editfor",Nothing)
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
With this solution I see the width
30px, but the value of the property Tel1 would’t be available on the server.
I tried this also without success:
SampleView.vbhtml
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1 New With { .class=”small-editfor”})
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
<td class="editor-field">
@Html.EditorFor(Function(model) model.Tel1 New With { .style=”width:30px”})
@Html.ValidationMessageFor(Function(model) model.Tel1)
</td>
Does anyone have an idea?