Print Page | Close Window

AfterEdit clear & add new items trouble

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=3655
Printed Date: 27 November 2024 at 6:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: AfterEdit clear & add new items trouble
Posted By: brujaedea
Subject: AfterEdit clear & add new items trouble
Date Posted: 15 February 2006 at 5:18am

Hi

All I want to do is clear and add new items to de PropertyGrid after I select an option in one item... (I have a combobox with some options depending on the one you select, you will have different new options)

My class has this:
- "LoadInfo" method that clears all categories and then adds all items depending on the class info. (it uses beginUpdate and EndUpdate)
-  After edit function that changes some class atrributtes and returns a boolean which expresses whether the propertygrid needs to be reloaded or not.

In my AfterEditEventHandler:
void Form1::my_axPropertyGrid_AfterEdit(System::Object * sender, AxInterop::XtremePropertyGrid::_DPropertyGridEvents_AfterEdi tEvent * e){
   
bool need_refresh = my_object->afteredit(sender,e);
    if (need_refresh){
        my_object->LoadInfo();
   
}
}
And.... It crashes after doing the LoadInfo... I get a nice NullReferenceException ... Any Idea of what I´m doing wrong??




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