Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using Wpf datagrid called IGrid

I want to get a Weather particular cell is read only or not in keyup event


In vb ordinary grid i use code below to get this
C#
If IGrid.CurrentRow.Cells(ColumnIndex).ReadOnly = True Then
End If

please give me equivalent for this in wpf datagrid


thanks.
Posted
Updated 4-Jan-16 4:44am
v3

This is how: DataGridCell.IsReadOnly Property (System.Windows.Controls)[^].

Your code sample with if ...ReadOnly = True Then is not good enough. ReadOnly is already Boolean, why comparing it with True?

For DataGridCell, right way to write code would be
VB
if cell.IsReadOnly Then
    '...
End If


—SA
 
Share this answer
 
Thanks for the reply

Can you please show how to do it. I use vb.net

thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900