예제 #1
0
 protected void OnDynamicColumnValueChanged(DynamicColumnValueChangedEventArgs e)
 {
     if (ValueChanged != null)
     {
         ValueChanged(this, e);
     }
 }
예제 #2
0
        private void item_DynamicColumnValueChanged(object sender, DynamicColumnValueChangedEventArgs e)
        {
            if (e.Column == null || !_dynamicColumns.ContainsKey(e.Column.GroupName))
            {
                return;
            }

            ColumnConfig columnConfig;

            if (!_dynamicColumns.TryGetValue(e.Column.GroupName, out columnConfig))
            {
                return;
            }

            if (e.Action == DynamicColumnValueChangedAction.Add)
            {
                columnConfig.Increment(e.HeaderText);

//                if(!columnConfig.ContainsKey(e.HeaderText))
//                {
//                    columnConfig.Add(e.HeaderText,1);
//
//                    //引发第二层表头修改事件
//                }
//                else
//                {
//                    columnConfig.HeaderTextList[e.HeaderText] += 1;
//                }
            }
            else if (e.Action == DynamicColumnValueChangedAction.Remove)
            {
                columnConfig.Decrement(e.HeaderText);

//                if (columnConfig.HeaderTextList.ContainsKey(e.HeaderText))
//                {
//                    columnConfig.HeaderTextList[e.HeaderText] -= 1;
//                }
            }

            //引发数据刷新事件
        }