向导中的数据绑定列表框在页面更改时丢失选择
我从本教程下载了源代码在尝试制作自己的向导失败后。该控件运行良好,并且很好地集成到我的程序中。不过,我有一个小问题。我有一个页面,同时具有数据绑定列表框和数据绑定树视图。当更改到下一页或上一页时,TreeView 会保留其选择,但 ListBox 不会。相反,它似乎会自我更新(从闪光灯来看)。如何防止这种情况发生并维护用户的选择?
谢谢,
乔
I downloaded the source code from this tutorial after a failed attempt to make my own Wizard. The control works great and is integrating nicely into my program. I have one minor problem, though. I have a page that has both a databound ListBox and a databound TreeView. When changing to the next or previous page, the TreeView maintains its selections but the ListBox does not. Instead, it appears to update itself (judging by the flash). How can I prevent this from happening and maintain the user's selections?
Thanks,
Joe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊!我很适合重用几个月来没有看过的代码。事实证明,TreeView 不是数据绑定的,而是由值对象填充的。我修改了 ListBox 以使用它自己的 VO,现在它工作得很好。这是一种复杂的做事方式,但不管怎样都行得通,对吧?
Ugh! Serves me right for re-using code that I haven't looked at in a couple of months. Turns out the TreeView is not data bound but populated from a Value Object. I modified the ListBox to use its own VO and now it works perfectly. Kind of a complicated way of doing things but whatever works, right?