ReadOnlyChanged Event

2 posts, 0 answers
  1. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 01 Aug 2013 Link to this post

    Is there any ReadOnlyChanged event for the GridView?  I don't see one for the GridView control itself.  Maybe it's down some path like ElementTree.  I'm searching but I can't find it.  What I'd like to do is set the ReadOnly property on that custom RadRadioButtonColumn whenever the GridView property changes.

    Thank you,
    Gary
  2. Dimitar
    Admin
    Dimitar avatar
    1411 posts

    Posted 06 Aug 2013 Link to this post

    Hello Gary,

    Thank you for writing.

    You can use the PropertyChanged event of the desired template to detect when the read only property value has changed: 
    void MasterTemplate_PropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "GridReadOnly")
        {
            // your code goes here
        }
    }

    Use the following line of code to wire the event:
    radGridView1.MasterTemplate.PropertyChanged += MasterTemplate_PropertyChanged;

    Also keep in mind that every column has its own ReadOnly property. If you set this property to true your column will remain read only even if you set the grid's ReadOnly property to false.

    I hope this helps. Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top