Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,691 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
We have a Datagrid, which display a Modal window for each cell(a cell is product o x features filled inside modal). We have a requirement that when modal is displayed, the datagrid should highlit corresponding cell. The problem which we have is, that even inactive selected cell is not working in this case. Any Help?
You can add GotFocus and LostFocus for the DataGridCell like below show:
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<EventSetter Event="GotFocus" Handler="myDataGridMain_GotFocus" ></EventSetter>
<EventSetter Event="LostFocus" Handler="myDataGridMain_LostFocus"></EventSetter>
</Style>
</DataGrid.CellStyle>
In the cs code add the below events: