By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,203 Members | 1,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,203 IT Pros & Developers. It's quick & easy.

index out of range error upon closing collectionEditor?

P: n/a
Has anybody run into this index out range exception when opening and
then closing a collectionEditor from within a PropertyGrid?

I use PropertyGrid to edit configurations in my application. One of
the fields is a collection. I can expand or collapse the collection in
the PropertyGrid fine. However,if I open the CollectionEditor
associated with the collection, do nothing, and just close it, I get
an index out of range error. Note that I get this error only when I
have the collection expanded inside the PropertyGrid. If I collapse
the collection inside the PropertyGrid, I don't get the error.

I didn't modify the behanviors of the PropetyGrid and CollectionEditor.
There seems to be no way to catch the above exception. I tried to
collapse the collection inside the PropertyGrid upon the EditValue
event in the CollectionEditor. But I got other tough exception. Sorry
my application is too complex to post a stripped down version here.

This error is quite annoying. I'm hitting wall in order to fix it.
Any tips would be greatly appreciated!

May 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Henry,

Did you write the collection editor by yourself or you use the one that
comes with the framework?

There was a bug in .NET 1.x (I don't know if it was fixed in 2.0) where if
there is a expandable node which also has modal editor (ellipsis button) and
one click on the ellipsis while the node is expanded the property grid
crashes very baddly. The solution was to collapse the node before openning
the modal editor.
--

Stoitcho Goutsev (100)

"Henry J." <ta********@yahoo.com> wrote in message
news:11*********************@j55g2000cwa.googlegro ups.com...
Has anybody run into this index out range exception when opening and
then closing a collectionEditor from within a PropertyGrid?

I use PropertyGrid to edit configurations in my application. One of
the fields is a collection. I can expand or collapse the collection in
the PropertyGrid fine. However,if I open the CollectionEditor
associated with the collection, do nothing, and just close it, I get
an index out of range error. Note that I get this error only when I
have the collection expanded inside the PropertyGrid. If I collapse
the collection inside the PropertyGrid, I don't get the error.

I didn't modify the behanviors of the PropetyGrid and CollectionEditor.
There seems to be no way to catch the above exception. I tried to
collapse the collection inside the PropertyGrid upon the EditValue
event in the CollectionEditor. But I got other tough exception. Sorry
my application is too complex to post a stripped down version here.

This error is quite annoying. I'm hitting wall in order to fix it.
Any tips would be greatly appreciated!

May 16 '06 #2

P: n/a
I have found some more info on this problem. It is a Microsoft bug by
this MSDN article:

http://support.microsoft.com/default...b;en-us;890950

And comments to this article:

http://www.codeproject.com/cs/miscct...ectiondata.asp

contains various workarounds for the bug.

May 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.