Home Forums WPF controls Xceed DataGrid for WPF Cell LostFocus

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24744 |

    How can I trap Cell LostFocus event? I tried to hook it up using EventSetter but the event did not fire every time I move among cells.

    Imported from legacy forums. Posted by nat (had 486 views)

    Xceed Support
    Member
    Post count: 5658

    <Style TargetType=”{x:Type xcdg:DataCell}”>
    <EventSetter Event=”LostFocus”
    Handler=”DataCell_LostFocus”/>
    </Style>

    private void DataCell_LostFocus( object sender, RoutedEventArgs e )
    {
    ( ( DataCell )sender ).Background = Brushes.HotPink;
    }

    Imported from legacy forums. Posted by Jenny [Xceed] (had 317 views)

    User (Old forums)
    Member
    Post count: 23064

    Basically, I would like to perform automatic commit when user goes out of cell but when I call EndEdit in LostFocus, it screwed up the edit functionality. Any idea?

    Imported from legacy forums. Posted by nat (had 348 views)

    User (Old forums)
    Member
    Post count: 23064

    I found out that the event is trigger even when I activate the cell to edit. I don’t want the event to be triggerred by this.

    Imported from legacy forums. Posted by nat (had 3773 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.