Hi!
My grid data is ExpandoObjects. The grid has ShowColumnMenu set to true, FilterMode set to GridFilterMode.FilterMenu and FilterMenuType set to FilterMenuType.CheckBoxList.
I am defining a bunch of GridColumn by looping a list. When defining these i set the Filterable parameter to false. But the th element still has the k-filterable css class, which add the extra padding to the right.
How do I get rid of the extra padding in my headers?
Here's a peek of my code:
<TelerikGrid @ref="Grid"
Data="Data"
Pageable="true"
Sortable="true"
Resizable="true"
Reorderable="true"
ShowColumnMenu="true"
Groupable="true"
SortMode="@SortMode.Multiple"
FilterMode="GridFilterMode.FilterMenu"
FilterMenuType="FilterMenuType.CheckBoxList"
ScrollMode="GridScrollMode.Scrollable"
OnRowContextMenu="OnRowContextMenuClick"
OnRowDoubleClick="HandleOnRowDoubleClick"
Width="100%"
RowHeight="40"
PageSize="100">
<GridColumns>
@*
Other GridColumns
*@
@if (Data?.Count() > 0)
{
foreach (var property in ((IDictionary<string, object>)Data.FirstOrDefault()).Where(p => AllDomainIdentifiers.Contains(p.Key)))
{
var domainModel = (DomainModel)property.Value;
<GridColumn Field="@($"{domainModel.Name}Field")"
FieldType="typeof(bool)"
Width="30px"
Filterable="false"
Groupable="false"
Sortable="false"
ShowColumnMenu="false"
Title="@domainModel.Abbreviation">
<HeaderTemplate>
<span id="@( $"domainHeader-{domainModel.Id.ToString()}" )" alt="@domainModel.Name">@domainModel.Abbreviation</span>
<TelerikTooltip TargetSelector="@( $"#domainHeader-{domainModel.Id.ToString()}" )"
ShowOn="@TooltipShowEvent.Hover"
Position="@TooltipPosition.Top" />
</HeaderTemplate>
<Template>
<div class="d-flex justify-content-center align-items-center">
<TelerikCheckBox Value="@HasDomainActivated(context as ExpandoObject, domainModel)"
ValueChanged="@((bool value) => HandleDomainActivationChanged(context as ExpandoObject, domainModel, value))"
Enabled="@(IsAuthorizedForAllDomains() || IsAuthorizedForDomain(domainModel))" />
</div>
</Template>
</GridColumn>
}
}
</GridColumns>
</TelerikGrid>