Divya
Divya

Reputation: 21

How to select a row, if i click a disabled cell in a wpf datagrid

I have a wpf dynamic datagrid with a column disabled. if i click a cell in that column, the row is not selected.

Upvotes: 2

Views: 625

Answers (1)

ColinE
ColinE

Reputation: 70122

The following article shows how to detect the row and column of a DataGrid click:

http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/

This will work for disabled columns also.

You can adapt this code so that when the row is found, you set its IsSelected property to true.

Upvotes: 2

Related Questions