Print Page | Close Window

Events fired when item is ReadOnly

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=7334
Printed Date: 21 November 2024 at 7:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Events fired when item is ReadOnly
Posted By: Albert1
Subject: Events fired when item is ReadOnly
Date Posted: 08 June 2007 at 7:39am

When an Item is ReadOnly, it should not fire events. In this code:


Private Sub Form_Load()
    With PropertyGrid1
        .AddCategory "category"
        .Categories(1).AddChildItem PropertyItemString, "Item"
        .Categories(1).Childs(1).ReadOnly = True
    End With
End Sub
Private Sub PropertyGrid1_AfterEdit(ByVal Item As XtremePropertyGrid.IPropertyGridItem, NewValue As String, Cancel As Boolean)
    MsgBox ("Why Am I here?")
End Sub


When you click on the data section of the Item and then you leave the field, the event AfterEdit is fired. If I have a centralized management inside this function I have to spend extra time in checking whether the Item is ReadOnly or not.
IMHO, ReadOnly=True should automatically set ItemHasEdit to False.


    PropertyGrid1.Categories(1).Childs(1).Flags = Not ItemHasEdit





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net