Beispiel #1
0
        protected virtual void OnToolRemoveClick(object sender, EventArgs e)
        {
            if (list.Selection.Count == 0 || list.Mode == LayoutListMode.Fields)
            {
                return;
            }
            for (int i = 0; i < list.Selection.Count; i++)
            {
                object o = list.Selection[i].Item;
                list.ItemRemove(o);

                if (list.ListSource != dataSource)
                {
                    ((IList)dataSource).Remove(o);
                }
                i--;
            }
            list.RefreshBounds(true);
        }