I have Datagrid like
<DataGrid Grid.Row="1" x:Name="mgrid" ItemsSource="{Binding MacrosGridData}" Margin="10,10,10,30" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="2" BorderBrush="Gray">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding Name}"/>
<DataGridCheckBoxColumn Header="Active" Binding="{Binding IsActive}"/>
<DataGridTextColumn Header="Checksum" Binding="{Binding Checksum}" />
<DataGridTemplateColumn Header="Actions">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DockPanel>
<Button Content="Save" IsEnabled="{Binding Name, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" Command="{Binding $parent[DataGrid].DataContext.SaveMacrosCommand}" CommandParameter="{Binding .}"/>
<Button Content="Delete" Command="{Binding $parent[DataGrid].DataContext.RemoveMacrosCommand}" CommandParameter="{Binding .}"/>
</DockPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
As you see i trying to disable button if Name is empty but after filling Name value Save button still disabled. If i sort DataGrid by any column Save button become enabled.
Before sorting
After sorting
I using Avalonia 11.3.12 and Avalonia.Controls.DataGrid 11.3.12
I have Datagrid like
As you see i trying to disable button if Name is empty but after filling Name value Save button still disabled. If i sort DataGrid by any column Save button become enabled.
Before sorting
After sorting
I using Avalonia 11.3.12 and Avalonia.Controls.DataGrid 11.3.12