0

I have a DataGridView with some columns and I change their ReadOnly property values programmatically. But I need an event which will rise (or give me a chance to do whatever I want) when this value changes. Now I have two questions:

1- Could I define a custom property based on this property? 2- Could I define an event based on property change? (I mean this property)

Thanks.

Sertan Pekel
  • 593
  • 2
  • 5
  • 23

2 Answers2

0

There is an event for ReadOnly changed in datagridview.

0

To know state change for a particular column use ColumnStateChanged event. Use the event argument to check whether the state change is for ReadOnly property.

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.columnstatechanged%28v=vs.110%29.aspx

Junaith
  • 3,298
  • 24
  • 34