This question is locked. New answers and comments are not allowed.
Hello,
I'm using the MVC extensions grid and have figured out how to apply a style to a single column. However, in my example below, I would like to apply "vertical-align" to all columns, and I assume there is a way to do so without coding it on every column individually. Can anyone help?
<%= Html.Telerik().Grid(Model)
.Name("SomeGrid")
.Columns(columns =>
{
columns.Bound(r => r.DateAdded).Width(60);
columns.Bound(r => r.AddedBy).Width(120).HtmlAttributes(new { style = "vertical-align: top;" });
columns.Bound(r => r.AccountNumber).Title("Acct #").Width(50).HtmlAttributes(new { style = "background-color: #ecede0;" });
...[more columns ommitted]
})
.DataBinding(dataBinding =>
{
dataBinding.Server().Select("Index", "Home", new { ajax = true });
dataBinding.Ajax().Select("_Index", "Home").Enabled(true);
})
.Pageable()
%>
I'm using the MVC extensions grid and have figured out how to apply a style to a single column. However, in my example below, I would like to apply "vertical-align" to all columns, and I assume there is a way to do so without coding it on every column individually. Can anyone help?
<%= Html.Telerik().Grid(Model)
.Name("SomeGrid")
.Columns(columns =>
{
columns.Bound(r => r.DateAdded).Width(60);
columns.Bound(r => r.AddedBy).Width(120).HtmlAttributes(new { style = "vertical-align: top;" });
columns.Bound(r => r.AccountNumber).Title("Acct #").Width(50).HtmlAttributes(new { style = "background-color: #ecede0;" });
...[more columns ommitted]
})
.DataBinding(dataBinding =>
{
dataBinding.Server().Select("Index", "Home", new { ajax = true });
dataBinding.Ajax().Select("_Index", "Home").Enabled(true);
})
.Pageable()
%>