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;" });
...
有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top