Exemplo n.º 1
0
        protected virtual void OnItemSourceChanged(DependencyPropertyChangedEventArgs e)
        {
            DataTable table = e.NewValue as DataTable;

            this._itemSource = table;
            if (!string.IsNullOrEmpty(_dataField))
            {
                if (table != null)
                {
                    var componentFiller = new ComponentFiller();
                    componentFiller.FillComboxBox(table, _dataField, ref this.KarveComboBox);
                }
            }
        }
Exemplo n.º 2
0
 private void OnDataFieldPropertyChanged(DependencyPropertyChangedEventArgs e)
 {
     _dataField = e.NewValue as string;
     if (_itemSource != null)
     {
         if (!string.IsNullOrEmpty(_dataField))
         {
             DataColumnCollection collection = _itemSource.Columns;
             if (collection.Contains(_dataField))
             {
                 ComponentFiller componentFiller = new ComponentFiller();
                 componentFiller.FillComboxBox(_itemSource, _dataField, ref KarveComboBox);
             }
         }
     }
 }