This question is locked. New answers and comments are not allowed.
Hi All,
I am using the Telerik Grid control for MVC. How do I increase the height of the header column?
One of my columns has a long text value but the data is small, so I have split the header using <br> but the header row doesn't increase in height to display the full text. Here's my code to help. I thought I might be able to put something in my RowAction event, but I dont know what to test against.
I am using the Telerik Grid control for MVC. How do I increase the height of the header column?
One of my columns has a long text value but the data is small, so I have split the header using <br> but the header row doesn't increase in height to display the full text. Here's my code to help. I thought I might be able to put something in my RowAction event, but I dont know what to test against.
@(Html.Telerik().Grid<GRID.ViewModels.EngineeringRiskViewModel>() .Name("risksGrid") .Sortable() .ToolBar(toolbar => toolbar.Template( @<text> @Html.ActionLink("Add Risk", "Create", "EngineeringRisk", new { policyZoneID = Model.PolicyZoneID, sectionID = Model.SectionID }, new { @class = "addLink" }) </text>)) .DataKeys(keys => keys.Add(r => r.RiskID)) .DataBinding(dataBinding => dataBinding.Ajax().Select("_RisksIndex", "EngineeringSection", new { policyZoneID = Model.PolicyZoneID, sectionID = Model.SectionID }) ) .Columns(columns => { columns.Bound(r => r.RiskID) .ClientTemplate( @Html.ActionLink(" ", "Edit", "EngineeringRisk", new { policyZoneID = Model.PolicyZoneID, sectionID = Model.SectionID, riskID = "<#= RiskID #>" }, new { @class = "editLink" }).ToHtmlString() + @Html.ActionLink(" ", "Delete", "EngineeringRisk", new { policyZoneID = Model.PolicyZoneID, sectionID = Model.SectionID, riskID = "<#= RiskID #>" }, new { @class = "deleteLink" }).ToHtmlString() ).Width(20).Title("Commands").Sortable(false).Filterable(false); columns.Bound(r => r.CategoryID).Width(230); columns.Bound(r => r.Description).Width(100); columns.Bound(r => r.RiskID).Hidden(); columns.Bound(r => r.CreatedBy).Hidden(); columns.Bound(r => r.CreatedOn).Hidden(); columns.Bound(r => r.SectionID).Hidden(); columns.Bound(r => r.TypesSize).Width(50); columns.Bound(r => r.SumInsured) .Width(30) .Aggregate(aggregates => aggregates.Sum()) .ClientFooterTemplate("Total: <#= typeof Sum != 'undefined' ? $.telerik.formatString('{0:0}', Sum) : 0 #>"); columns.Bound(r => r.BDN).Width(1); columns.Bound(r => r.EXP).Width(1); columns.Bound(r => r.ADL).Width(1); columns.Bound(r => r.MDL).Width(1); columns.Bound(r => r.FRAG).Width(1); columns.Bound(r => r.OSP).Width(1); columns.Bound(r => r.SUD).Width(1); columns.Bound(r => r.LGE).Width(1); columns.Bound(r => r.Quantity).Width(5); columns.Bound(r => r.InspectionPremium) .Width(100) .Aggregate(aggregates => aggregates.Sum()) .ClientFooterTemplate("Total: <#= typeof Sum != 'undefined' ? $.telerik.formatString('{0:0}', Sum) : 0 #>"); columns.Bound(r => r.InsurancePremium) .Width(100) .Aggregate(aggregates => aggregates.Sum()) .ClientFooterTemplate("Total: <#= typeof Sum != 'undefined' ? $.telerik.formatString('{0:0}', Sum) : 0 #>"); }) .RowAction(row => { if (row.IsAlternate) { row.HtmlAttributes["style"] = "background:aliceblue;"; } }) .ClientEvents(events => events.OnDataBound("risks_onDataBound")) )