Windows Develop Bookmark and Share   
 index > Windows Forms Designer > RemoveItem and SetItem in the collection editor are not firing
 

RemoveItem and SetItem in the collection editor are not firing

protected override void SetItem(int index, ColumnBase item)

{

base.SetItem(index, item);

}

I am not able to fire the above method using Up & Down button of the collection editor

protected

override void RemoveItem(int index)

{

ColumnBase col = this[index];

base.RemoveItem(index);

OnItemsRemoved(

new ColumnsEventArgs(col));

}

I am not able to fire the above method using Remove button of the collection editor.

Anybody can suggest how to fire those events as i wanted to perform some activities on click of remove , Up & Down buttons?

bikkisuresh  Friday, July 24, 2009 5:10 AM
Hi bikkisuresh,

Form your code snippet, I can see that you create your own collection. Could you please provide the complete code snippet of the class, includes its parent class?

If we want to handle some events of the CollectionEditor, we need to create our own collection editor. This link shows how to do that:
http://msdn.microsoft.com/en-us/library/9zky1t4k.aspx.

Best regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Friday, July 31, 2009 10:22 AM
Hi bikkisuresh,

Could you please let me know if my reply helps?

Best regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Tuesday, August 04, 2009 3:59 AM

Hi,

We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Tuesday, August 04, 2009 11:40 AM
Not helpful.
bikkisuresh  Thursday, October 01, 2009 7:46 AM
Hi bikkisuresh,

Form your code snippet, I can see that you create your own collection. Could you please provide the complete code snippet of the class, includes its parent class?

Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, October 01, 2009 7:53 AM

You can use google to search for other answers

Custom Search

More Threads

• Error at design time in visual studio 2002 and not in visual studio 2003
• Form turns bad after converting from MC++ to C++/CLI
• Groupbox
• Why BackgroundImageLayout::center don't act like PictureBoxSizeMode::CenterImage
• Understanding: TextBox.MaximumSize Property and MinimumSize Property.
• User Control resizes when placed on form (VS 2005)
• Inherited Toolstrips cannot be Designed
• Multi Language form design.
• Controls position on window resizings...
• Multiline inputbox in propertygrid