How Can I use DevEx textbox as textboxfor?

I cant find any example about this topic. I try to write some code but it post null model.

@model DevExpressMvcApplication2.Models.Customers
@{
    ViewBag.Title = "MusteriEkle";
}
@using (Html.BeginForm((string)ViewBag.FormAction, "Home"))
{
<div class="editorContainer">
    @Html.DevExpress().TextBox(
            settings =>
            {
                settings.Name = "textBox1";
                settings.Width = 170;
                settings.Properties.NullText = "Enter your name...";
            }
        ).Bind(Model.customer_name).GetHtml()
</div>
<input type="submit" value="submit" />
}

Is there any example about this topic. I want to use devEx elements as html.helper with "for"

Muchas Gracias

preguntado el 31 de julio de 12 a las 10:07

2 Respuestas

It is necessary to use the DevExpressEditorsBinder in the [HttpPost] Controller Action and set the TextBox.Name property = the model field/property.

Respondido 31 Jul 12, 17:07

@Html.DevExpress().TextBoxFor(model => model.Code,
settings => {
settings.Name = "txtCode";
settings.Width = 170;
settings.Properties.NullText = "000"; }).GetHtml()

Respondido el 31 de diciembre de 13 a las 05:12

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.