© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
4 replies
nathanAjacobs

WPF - DataGridCheckBoxColumn Issues

In WPF, how can I have a DataGridCheckBoxColumn that allows me to click the checkboxes without having to select the row first. It's weird that when I click the checkbox it selects the row rather than just clicking the checkbox

I have this which seems to work, but it doesn't seem to update the value in the model when the checkbox is clicked. It only gets updated when I click the cell and click away.
How can I fix it so that when I click the checkbox it updates the model?

<DataGridTemplateColumn Header="Enabled" MinWidth="100" Width="100">
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <CheckBox IsChecked="{Binding Enabled, Mode=TwoWay}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Enabled" MinWidth="100" Width="100">
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <CheckBox IsChecked="{Binding Enabled, Mode=TwoWay}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Issues with WPF
C#CC# / help
13mo ago
WPF ScrollViewer issues
C#CC# / help
3y ago
✅ Issues with wpf binding
C#CC# / help
13mo ago
✅ Help with wpf binding issues
C#CC# / help
12mo ago