Pregunta

I want a label and a text box next to each other but i didn't do what i want. How can i do that?

ViewContext.Writer.Write(
       "<div class=\"edit_form\">" +
          "<div class=\"line\">"
    );

    Html.DevExpress().Label(label =>
    {
        label.Text = "Action";
        label.ControlStyle.CssClass = "label";
        label.AssociatedControlName = "Action";
    }).Render();

    Html.DevExpress().TextBox(textBox =>
    {
        textBox.Name = "Action";
        textBox.Width = Unit.Percentage(30);
        textBox.ControlStyle.CssClass = "editor";
    }).Bind(DataBinder.Eval(test, "Action")).Render();

    ViewContext.Writer.Write(
          "</div>"+
       "</div>"
   );
¿Fue útil?

Solución

DevExpress create every time a element in the DOM, therefore sometimes couldn't be straightforward to customize the page. Anyway you can:

1) Use ASPxThemeBuilder to modify your DevExpress theme;

2) CSS:

<div style="float: left;"> Html.DevExpress().TextBox.. </div>
<div style="float: left;"> Html.DevExpress().TextBox.. </div>
<div style="float: left;"> Html.DevExpress().TextBox.. </div>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top