Hello, I'm attaching a sample with a XamDatagrid with the above properties: RecordSelectorLocation="None" , HorizontalAlignment="Stretch" and CellClickAction="SelectRecord"
In the sample i don't want to select the row when i click 'outside' of the rows (the SlateGray color of the XamDataGrid backround). The only way to select a row must be only when a cell is selected. How can i do that?
Thanks in advance!
Thanks Valerie this works great! Thank you for the quick response!
Hello George,
You can handle the DataRecordPresenter’s Preview Mouse Left Button Down event and examine the Original Source to determine which part of the DataRecordPresenter was actually clicked. This event can be handled by adding a style targeting DataRecordPresenter with an event setter handling the PreviewMouseLeftButtonDown event. With a simple grid it will probably suffice to check if the original source is a card panel. For more complex scenatio’s you could also walk the visual tree to see if the clicked area is inside of a CellValuePresenter.
See modified sample.
Let me know if you have any questions.
Sincerely,
Valerie
Software Developer
Infragistics Inc
The sample project is the above