Esempio n. 1
0
        /// <summary>
        /// Sets all items within the StateBag to be dirty
        /// </summary>
        protected internal override void SetViewStateDirty()
        {
            base.SetViewStateDirty();

            Hashtable table = new Hashtable();

            foreach (string key in _List.Attributes.Keys)
            {
                table[key] = _List.Attributes[key];
            }
            _List.Attributes.Clear();
            foreach (string key in table.Keys)
            {
                _List.Attributes[key] = (string)table[key];
            }

            foreach (string key in _List.VS.Keys)
            {
                PropertyInfo pinfo = _List.GetType().GetProperty(key);
                if ((pinfo != null) && pinfo.CanRead && pinfo.CanWrite)
                {
                    object obj = pinfo.GetValue(_List, null);
                    pinfo.SetValue(_List, obj, null);
                }
            }

            _List.Font.CopyFrom(_List.Font);

            foreach (StateItem item in _List.VS.Values)
            {
                item.IsDirty = true;
            }
        }