Frage

I have a Telerik MVC 2 grid in which there is a command button containing Edit and Delete buttons. But the problem is that Edit and Delete button are not in the same line (Edit is above Delete button and row becomes thicker). I want that Edit and Delete button are in the same line so that the row is thinner. How to do it? Thanks.

Here is the code,

...
.Editable(e => e.Mode(GridEditMode.InLine).Enabled(true))
...
columns.Bound(a => a.PersonalCoachId)
.Width(150);
columns.Command(a =>
{
if (Model.Editable)
{
a.Edit().ButtonType(GridButtonType.ImageAndText);
a.Delete().ButtonType(GridButtonType.ImageAndText);
}
})
.Width(95)
.HtmlAttributes(new { style = "float:left;display:inline;" });
...
War es hilfreich?

Lösung

I found the answer which is surprisingly simple, but very tricky. Just change to .HtmlAttributes(new { style = "white-space:nowrap;float:right;" })

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top