none
Datagrid selection problem

    General discussion

  • Using WPF code, is it possible to disable any selection of row or cell in a data grid without using IsHitTestVisible property ?

    My datagrid is part of a data template, so cannot really do hard-coding to disable selection....

    Thanks for all proposed answer and help...
    • Changed type Tao Liang Tuesday, February 24, 2009 3:00 AM
    • Changed type Tao Liang Tuesday, February 24, 2009 3:00 AM
    • Changed type Tao Liang Tuesday, February 24, 2009 3:00 AM
    Friday, February 20, 2009 1:14 AM

All replies

  • For more detailed information, can you paste your demo code here?
    You can use the brush like icon on the top-right of the editor.
    Then I can compile your program and try to add the function or feature you have asked.

    Monday, February 23, 2009 10:03 AM
  • We are changing the issue type to “General Discussion” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!

    Tuesday, February 24, 2009 2:59 AM
  • Private Sub DataGrid1_SelectedCellsChanged(sender As Object, e As System.Windows.Controls.SelectedCellsChangedEventArgs) Handles DataGrid1.SelectedCellsChanged
            DataGrid1.UnselectAll()
    End Sub
    

     

    Wednesday, November 02, 2011 2:57 PM