通过CollectionEditor编辑时,嵌套的集合不会被保存. [英] Nested collections are not getting saved when edited via the CollectionEditor.

查看:70
本文介绍了通过CollectionEditor编辑时,嵌套的集合不会被保存.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在确定最佳解决方案时遇到了一些困难,以解决我遇到的问题.基本上,问题在于,如果我有嵌套"集合,那么设计器将无法正确保留更改.基本上,如果您改变 最深"集合,然后按确定"退出编辑表单,然后转到最外面的表单时,对内部集合的更改将丢失.换句话说,基本问题(我认为)是嵌套集合具有 其成员已更改-但集合本身未更改-因此外部集合无法识别发生了任何更改.结果,所有内部更改都被取消并丢失.这似乎很普通,肯定在那里 是补救情况的一种清洁"机制.任何帮助将不胜感激.

I am having some difficulty in determining what the best course of action is to remedy a problem I am having.  Basically the issue is that if I have 'nested' collections, then the designer does not persist the changes properly. Basically, if you alter the 'deepest' collection, then exit back out of the edit forms by pressing OK, then when you get to the outer most form, the changes to the inner collection are lost.  In other words, the basic problem (I believe) is that the nested collection is having its members changed - but not the collection itself - therefore the outer collection does not recognize that any changes took place.  As a result the entire inner changes are cancelled and lost.  This seems like such a common thing, surely there is a 'clean' mechanism to remedy the situation.  Any help would be appreciated.

推荐答案

您好,AtBrian,

Hi AtBrian,

由于您的问题与Winforms控件无关,因此我将其移至C#论坛寻求帮助.

As your issue is not related to Winforms controls, I will move it to C# forum for help.

此致,
唐友军

Regards,
Youjun Tang


这篇关于通过CollectionEditor编辑时,嵌套的集合不会被保存.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆