public void RemoveSelectItems<T>(BaseListBoxControl listControl)
        {
            var list = listControl.DataSource as List<T>;
            var selectItems = ((ListBoxControl) (listControl)).SelectedItems;
            foreach (var Item in selectItems)
            {
                list.Remove((T)Item);
            }
            listControl.DataSource = null;
            listControl.DataSource = list;

        }

posted on 2013-12-28 14:05  万德源  阅读(3574)  评论(0编辑  收藏  举报