PropertyValueChanged event

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default PropertyValueChanged event

    I have a custom object that I use in a PropertyGrid as seen below. It
    presents an elipsis button that when clicked brings up a custom modal
    dialog. When I make a change in the property, the PropertyValueChanged event
    never gets fired. I have other properties in the PropertyGrid that do fire
    the event. Is there anything special that I need to do to have the event
    fired?

    [System::ComponentModel::EditorAttribute(__typeof(C PictureEditor),
    __typeof(System::Drawing::Design::UITypeEditor))]
    [System::ComponentModel::TypeConverterAttribute(__t ypeof(CPictureConverter))
    ]
    [Serializable]
    public __gc class PictureObj : public
    System::Runtime::Serialization::ISerializable
    {
    private:
    CPicture* m_pPicture;
    public:
    PictureObj()
    {
    m_pPicture = new CPicture;
    }
    ~PictureObj()
    {
    delete m_pPicture;
    }
    PictureObj(System::Runtime::Serialization::Seriali zationInfo *si,
    System::Runtime::Serialization::StreamingContext sc)
    {
    m_pPicture = new CPicture;
    SetObjectData(si, sc);
    }
    void SetPicture(CPicture* pic) { *m_pPicture = *pic; }
    CPicture* GetPicture() { return m_pPicture; }
    void GetObjectData(System::Runtime::Serialization::Seri alizationInfo
    *si,

    System::Runtime::Serialization::StreamingContext sc);
    void SetObjectData(System::Runtime::Serialization::Seri alizationInfo
    *si,

    System::Runtime::Serialization::StreamingContext sc);

    __property IPicture* get_Picture() { return m_pPicture->m_pImage; }
    __property void set_Picture(IPicture* value) { m_pPicture->m_pImage =
    value; }
    __property System::String* get_ImageExt() { return new
    System::String(m_pPicture->m_strImageExt); }
    __property void set_ImageExt(System::String* value) {
    m_pPicture->m_strImageExt = value; }
    };



    David W. Simmonds Guest

  2. Similar Questions and Discussions

    1. Getting Error: Event Type 'flash.event:event' is unavailable ?????
      Hi, I am not using Cairngorm or anything, but trying to get an app built first without it then look into it. I am getting this error however...
    2. stumped...table - row - click event, cancel checkbox event
      I have a html table and mutliple rows. On each row i put an onclick event that opesn a modal window and prompts the user for some information. I...
    3. ItemDataBound Event - How to access the previous record when this event is raised in DataGrid?
      ItemDataBound Event - How to access the previous record when this event is raised in DataGrid? During "ItemDataBound Event", I would like...
    4. Urgent: Event executed on server and data which is received by that event sent to the client.
      Hi I am creating a web-based instant messaging application using asp.net. I have a DLL of which I create an object. This object has some...
    5. Assign Javascript event handler function dynamically to a Flash object event?
      I have a Flash player object embedded in one of my web pages. I want to assign code to the OnReadyStateChange event for the object. Every...
  3. #2

    Default RE: PropertyValueChanged event

    Hi David,

    Is this the complete code? I don't see the event handler nor the event
    hookup. If you have those, please post them as well.
    If you don't have them, you need to get the event hooked up.

    Thanks,
    Earl Beaman
    Microsoft, ASP.NET

    This posting is provided "AS IS", with no warranties, and confers no
    rights.


    Earl Beaman[MS] Guest

  4. #3

    Default Re: PropertyValueChanged event

    Hi,

    You need to create your own class that derived from UITypeEditor and
    override the EditValue method. In that method open the form and when you
    finish return the value to the Value parameter. You should also override
    the GetEditStyle to set the modal mode.

    This, at least, works for me.

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139