我有一个Telerik MVC 2网格,其中有一个包含编辑和删除按钮的命令按钮。但问题是编辑和删除按钮不在同一行(编辑在删除按钮上方,行变得更粗)。我希望“编辑”和“删除”按钮位于同一行,以便行更细。怎么做?谢谢。
这是代码,
...
.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;" });
...
答案 0 :(得分:0)
我发现答案非常简单,但非常棘手。只需改为 .HtmlAttributes(new {style =“white-space:nowrap; float:right;”})