Windows aplln C#.net中的列表框 [英] listbox in windows aplln C# .net

查看:83
本文介绍了Windows aplln C#.net中的列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Frnds,
我有两个ListBoxes ..... IN在两个我已与数据源绑定的盒子中...
例如,我在两个列表框中都绑定了印度国....但是在两个列表框中,州都不同...我上午使用两个按钮将一个列表框中的选定数据移动到另一个列表框中...也删除了所选数据从列表框中....

设置DataSource属性时,无法修改 Items集合,因此出现错误.

我不知道如何修改数据源数据

Hi Frnds,
I Have Two ListBoxes.....IN both boxes i have binded with datasource...
for example i have binded States of India in both List box....But in both list box states are different...i AM using two buttons to move selected datas in one listbox to another listbox...also selected datas to remove from the list box....

I got error as Items collection cannot be modified when the DataSource property is set.

I dont know how to modify the datasource datas

推荐答案

为什么不能从第一个数据集生成第二个数据集(而不是将相同的数据集绑定到两个都).然后,您可以将第一个带有一个列表框的数据绑定到另一个列表框
Why can''t you generate a second data set from the first one (rather than binding the same data set to both of them). Then you can bind the first one with one list box and the second data set to another list box


您不能直接修改列表框的数据源集合.
尝试从列表中删除该项目.
You cannot modify the datasource collection for a list box directly.
Try removing the item from the list.


这篇关于Windows aplln C#.net中的列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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