Stopping user from selecting/unselecting rows in WPF DataGrid -


i have datagrid on wpf page , want prevent user selecting cells. feature needed testing, don't want change in code.

after datagrid filled, make sure of rows selected. want make sure user cannot select/unselect rows.

i tried setting isenabled = false , ishittestvisible = "false" both of these solutions disable scrollbars.

is there way this?

why not set ishittestvisible="false" datagridrow or datagridcell objects only?

that's easy using implicit style in <datagrid.resources>, , should disable hit-testing on rows or cells, should leave other areas of datagrid functional, such headers or scrollbars

<datagrid.resources>     <style targettype="{x:type datagridrow}">         <setter property="ishittestvisible" value="false" />     </style> </datagrid.resources> 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -