Reputation: 507
I have DataGrid, it looks like:
But I want it to be like:
I tried to add FlowDirection="RightToLeft"
, but then it looks like:
XAML:
<DataGrid FlowDirection="RightToLeft" ItemsSource="{Binding TableComments}" x:Name="dataGrid">
<DataGrid.Columns >
<DataGridTemplateColumn >
<DataGridTemplateColumn.CellTemplate >
<DataTemplate>
<Button Command="{Binding DataContext.AddCommand, ElementName=dataGrid}"
CommandParameter="{Binding SelectedItems, ElementName=dataGrid}">Add</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
How to achive the result that I want? i.e buttons to the right, and other columns to the left( and their content's horizontalalign to left)
Upvotes: 0
Views: 118
Reputation:
You can set DataGrid property
AutoGenerateColumns="False"
And manually add comment column. And from this point you are free of customization.
Upvotes: 2