Exemplo n.º 1
0
 public CheckedItemTraverser(
     IList <RadListDataItem> collection,
     CheckAllDataItem checkAllItem,
     bool checkAll)
     : base(collection)
 {
     this.checkAllItem = checkAllItem;
     this.checkAll     = checkAll;
 }
Exemplo n.º 2
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.checkedItems = new DropDownCheckedItemsCollection(this);
            RadCheckedListDataItemCollection dataItemCollection = new RadCheckedListDataItemCollection(this, this.ListElement.DataLayer, this.ListElement);

            this.checkAllItem                                      = new CheckAllDataItem("Check All", this);
            this.checkAllItem.Owner                                = this.ListElement;
            this.ListElement.DataLayer.Items                       = (RadListDataItemCollection)dataItemCollection;
            this.ListElement.Items                                 = (IList <RadListDataItem>)dataItemCollection;
            this.checkedItemTraverser                              = new CheckedItemTraverser((IList <RadListDataItem>)dataItemCollection, this.checkAllItem, this.ShowCheckAllItems);
            this.ListElement.ViewElement.DataProvider              = (IEnumerable)this.checkedItemTraverser;
            this.ListElement.Scroller.Traverser                    = (ITraverser <RadListDataItem>) this.checkedItemTraverser;
            this.ListElement.SelectionMode                         = SelectionMode.One;
            this.ListElement.DataLayer.DataView.CollectionChanged += new NotifyCollectionChangedEventHandler(this.DataView_CollectionChanged);
            this.autoCompleteEditableAreaElement.AutoCompleteTextBox.AutoCompleteDataSource = (object)dataItemCollection;
            this.autoCompleteEditableAreaElement.AutoCompleteTextBox.AutoCompleteMode       = AutoCompleteMode.SuggestAppend;
            this.ListElement.ViewElement.ElementProvider = (IVirtualizedElementProvider <RadListDataItem>) new CheckedDropDownListElementProvider(this.ListElement);
            this.WireAutoCompleteEvents();
            this.Children[2].MinSize = new Size(0, 18);
        }