Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1485
Problem "reactivating" a record - no event triggered?
posted

I've been having a problem for a couple of weeks, and I can't find anything I did wrong (which doesn't mean I didn't.)  So I'm hoping for some insight.

 Scenario: I have two XamDataGrids.  Each one is in a different user control in separate panes in a XamDockManager.  When I click on a record in the first grid, it does a few things:  (1) Populate the other grid with some records, (2) Display a text description that record in a separate pane (in a simple textbox...)

Now, the user might decide to click on a record in the second grid, at which  point the text description pane is updated with that record's detail.  This works fine.  The record in the first grid stays highlighted (that's what I want.)  Here's where things get ugly: If the user clicks on the same record as before in the first grid, I want the text description pane to be updated again with this record's details.  Should be easy enough, but neither RecordActivated nor SelectedItemChanged are triggered.  Kind of makes sense, but it's a real pain since there's nothing else that would capture this action (that I could find anyway.)

I tried experimenting with the grid's GotFocus and LostFocus events, but these seem to be working at random.  It'll work the first time - the event is triggered and I have some logic to handle redisplaying the record's details.  However, if I click again in the second grid, then back again in the first, this time no event whatsoever is being triggered!  It doesn't go anywhere near the grid's GotFocus and LostFocus events (tried both - by the way for some reason LostFocus is triggered when it gets the focus, not when it loses it - what the hell?)

 I tried the XamFeatureBrowser, where there's a sample that displays the grid events, and I confirmed that RecordActivated isn't triggered if you click out of the grid and then click again on the selected records.  But what else is there that I could use in my situation?

I tried this in the newly-released 8.2 as well, same behavior...

Thanks,
Michel