Пример #1
0
        public override Element Build()
        {
            GridElement gridElement = new GridElement("Grid");

            _rootElement            = gridElement;
            gridElement.ElementType = DerivationUtility.GetTag(_derivationInfo.ElaboratedExpression.MainElaboratedTableVar.TableVar.MetaData, "Grid.ElementType", _derivationInfo.PageType, "Grid");
            gridElement.Source      = _derivationInfo.MainSourceName;
            CreateGridElement(gridElement, _derivationInfo.ElaboratedExpression.MainElaboratedTableVar.TableVar, String.Empty, _derivationInfo.PageType, _derivationInfo.IsReadOnly);

            foreach (ElaboratedTableVarColumn column in _derivationInfo.ElaboratedExpression.Columns)
            {
                BuildColumn(column);
            }

            return(_rootElement);
        }
Пример #2
0
        protected virtual GridElement CreateGridElement(GridElement element, Schema.TableVar tableVar, string titleSeed, string pageType, bool isReadOnly)
        {
            MetaData metaData = null;

            if (tableVar.MetaData != null)
            {
                metaData = DerivationUtility.ExtractTags(tableVar.MetaData.Tags, "Grid", pageType);
            }
            PrepareElement(element, metaData, tableVar.MetaData, titleSeed, pageType, isReadOnly);

            //AElement.Title = ATitleSeed + DerivationUtility.GetTag(LMetaData, "Title", APageType, FDerivationInfo.ElaboratedExpression.MainElaboratedTableVar.TableTitle); // grid has no title
            element.Hint = DerivationUtility.GetTag(metaData, "Hint", pageType, DerivationUtility.GetTag(tableVar.MetaData, "Hint", pageType, _derivationInfo.ElaboratedExpression.MainElaboratedTableVar.TableTitle));
            element.Properties.AddOrUpdate("Source", element.Source);
            //if (AIsReadOnly)
            //	AElement.Properties.AddOrUpdate("ReadOnly", "True");

            return(element);
        }