Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for WPF / XamCheckBox Editor in XamDataGrid toggling when clicking anywhere in cell

XamCheckBox Editor in XamDataGrid toggling when clicking anywhere in cell

New Discussion
Casey Sroda
Casey Sroda asked on Mar 24, 2026 1:38 PM

Hello.

I am using a XamCheckEditor as a field in a XamDataGrid. The current (what I assume to be default) behavior is that the checkbox is toggled no matter where in the cell I click. This is preventing me from being able to select multiple rows of checkboxes via Ctrl+Shift and using Ctrl+D to fill down. I am looking for a way to make the checkbox toggleable only when directly clicked on. Several suggestions online included setting the horizontal and vertical alignment and the FieldSettings.CellClickAction to “EnterEditModeIfAllowed”, but those were unsuccessful in my testing.

Thanks,

Casey

Sign In to post a reply

Replies

  • 0
    Andrew Goldenbaum
    Andrew Goldenbaum answered on Mar 24, 2026 4:01 PM

    Hello Casey,

    I have been investigating the behavior you are seeing in this case, but I am not seeing the behavior in which clicking anywhere in a cell toggles the XamCheckEditor within the XamDataGrid. On my end, it is necessary to click the actual checkbox portion of the editor to toggle the checked state.

    I am attaching a sample project that demonstrates this behavior. Would it be possible for you to please modify this sample and send it back or provide some additional information about the configuration of your grid such that I can reproduce the behavior you are seeing?

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew Goldenbaum
    Software Developer – Team Lead

  • 0
    Max Martin
    Max Martin answered on Mar 27, 2026 5:35 AM

    The issue happens because XamDataGrid enters edit mode on any cell click, which toggles the checkbox.

    Stop auto toggle

    <igDP:Field Name=”IsChecked”>
    <igDP:Field.Settings>
    <igDP:FieldSettings CellClickAction=”SelectCell”/>
    </igDP:Field.Settings>
    </igDP:Field>

    Toggle only when checkbox is clicked

    private void Grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
    var dep = (DependencyObject)e.OriginalSource;

    while (dep != null && !(dep is XamCheckEditor))
    dep = VisualTreeHelper.GetParent(dep);

    if (dep is XamCheckEditor editor)
    {
    editor.IsChecked = !(editor.IsChecked ?? false);
    e.Handled = true;
    }
    }

    Result

    Click cell → no toggle
    Click checkbox → toggle
    Ctrl/Shift multi-select works

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Casey Sroda
Favorites
0
Replies
2
Created On
Mar 24, 2026
Last Post
1 month, 2 weeks ago

Suggested Discussions

Created by

Created on

Mar 24, 2026 1:38 PM

Last activity on

Mar 24, 2026 1:38 PM