Wpf Toolbar Focus

Wpf Toolbar Focus

Old forum URL: forums.lhotka.net/forums/t/5986.aspx


ajj3085 posted on Friday, December 12, 2008

Hi,

I've hit a problem in Wpf that I've already solved in Winforms... but I'm not sure how to handle it in Wpf.

The problem is with grid controls; if you edit a cell in a grid, then click a toolbar button, the cell doesn't lose focus and thus the edit is not committed to the datasource, so the edit levels are out of sync.

In WinForms, I handled the button click and was able to run some code to force the grid to exit it's edit mode, and everything went fine.

In Wpf, the CslaDataSource's CommandManager is handling everything for me... so I'm not sure how to code up my solution (which would be the same, telling the grid to exit its edit mode).

Any ideas?

Copyright (c) Marimer LLC