Habanero.BO.Loaders.XmlUIGridColumnLoader.LoadUIProperty C# (CSharp) Method

LoadUIProperty() public method

Loads a grid property definition from the xml element provided
public LoadUIProperty ( XmlElement uiPropElement ) : IUIGridColumn
uiPropElement System.Xml.XmlElement The xml element
return IUIGridColumn
        public IUIGridColumn LoadUIProperty(XmlElement uiPropElement)
        {
            return (IUIGridColumn) Load(uiPropElement);
        }

Same methods

XmlUIGridColumnLoader::LoadUIProperty ( string xmlUIProp ) : IUIGridColumn

Usage Example

Beispiel #1
0
        /// <summary>
        /// Loads grid definition data from the reader
        /// </summary>
        protected override void LoadFromReader()
        {
            _uiGrid = _defClassFactory.CreateUIGridDef();

            _reader.Read();
            _uiGrid.SortColumn = _reader.GetAttribute("sortColumn");

            _reader.Read();

            if (_reader.Name == "filter")
            {
                XmlFilterLoader filterLoader = new XmlFilterLoader(DtdLoader, _defClassFactory);
                _uiGrid.FilterDef = filterLoader.LoadFilterDef(_reader.ReadOuterXml());
            }

            while (_reader.Name == "column")
            {
                XmlUIGridColumnLoader propLoader = new XmlUIGridColumnLoader(DtdLoader, _defClassFactory);
                _uiGrid.Add(propLoader.LoadUIProperty(_reader.ReadOuterXml()));
            }

            if (_uiGrid.Count == 0)
            {
                throw new InvalidXmlDefinitionException("No 'column' " +
                                                        "elements were specified in a 'grid' element.  Ensure " +
                                                        "that the element " +
                                                        "contains one or more 'column' elements, which " +
                                                        "specify the columns to appear in the grid.");
            }
        }
All Usage Examples Of Habanero.BO.Loaders.XmlUIGridColumnLoader::LoadUIProperty