Hi, I have a gridview with several template columns which contains buttons. I need those buttons to be top aligned but for some reason they keep being forced to be vertically centered.
Here is an example of one of the columns:
<telerik:GridViewColumn>
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<telerik:RadButton Content="Delete" Command="telerik:RadGridViewCommands.Delete" CommandParameter="{Binding}"
VerticalAlignment="Top" HorizontalAlignment="Center" Height="20" Margin="0,0,0,0" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
It looks fine when the row is only 1 line tall but when the row grows it becomes obvious that the button is middle aligned instead of top aligned. I must be missing something really obvious here but it's been driving me crazy.
Here is an example of one of the columns:
<telerik:GridViewColumn>
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<telerik:RadButton Content="Delete" Command="telerik:RadGridViewCommands.Delete" CommandParameter="{Binding}"
VerticalAlignment="Top" HorizontalAlignment="Center" Height="20" Margin="0,0,0,0" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
It looks fine when the row is only 1 line tall but when the row grows it becomes obvious that the button is middle aligned instead of top aligned. I must be missing something really obvious here but it's been driving me crazy.