当前位置: 首页>>代码示例>>C#>>正文


C# TableRow.AddElement方法代码示例

本文整理汇总了C#中TableRow.AddElement方法的典型用法代码示例。如果您正苦于以下问题:C# TableRow.AddElement方法的具体用法?C# TableRow.AddElement怎么用?C# TableRow.AddElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TableRow的用法示例。


在下文中一共展示了TableRow.AddElement方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateSliceHeaderTable

        /// <summary>
        /// Create a slice header table that will contain the slice key titles and values
        /// </summary>
        /// <param name="state">
        /// The current state
        /// </param>
        /// <returns>
        /// The slice header table
        /// </returns>
        protected Table CreateSliceHeaderTable(RendererState state)
        {
            var table = new Table();
            table.AddClass(HtmlClasses.SliceKeys);
            table.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
            table.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
            foreach (string key in state.Model.SliceKeys)
            {
                var row = new TableRow();
                table.AddElement(row);

                var value = state.InputRow[key] as string;
                value = value ?? " ";
                var title = new TableCell(state.Model.AllValidKeys[key]);
                title.AddClass(HtmlClasses.SliceKeyTitle);
                row.AddElement(title);

                string text = this.GetLocalizedName(key, value);
                var val = new TableCell();

                // Implemented like in java to show description only
                val.SetupDisplayText(value, text, key, DisplayMode.Description, false);
                val.AddClass(HtmlClasses.SliceKeyValue);
                row.AddElement(val);
            }

            return table;
        }
开发者ID:alcardac,项目名称:SDMX_DATA_BROWSER,代码行数:37,代码来源:HtmlRenderer.cs

示例2: CreateContainerTable

        /// <summary>
        /// Create the container table. The container table holds the slice header and slice data tables.
        /// </summary>
        /// <returns>
        /// The table that holds the slice header and data
        /// </returns>
        private static Table CreateContainerTable()
        {
            var containerTable = new Table();
            containerTable.AddClass(HtmlClasses.Container);
            containerTable.AddAttribute(HtmlConstants.CellPadding, ZeroValue);
            containerTable.AddAttribute(HtmlConstants.CellSpacing, ZeroValue);
            var sliceRow = new TableRow();
            containerTable.AddElement(sliceRow);
            var skeys = new TableCell();
            skeys.AddClass(HtmlClasses.SliceKeys);
            sliceRow.AddElement(skeys);

            var hvkeys = new TableRow(new TableCell());
            hvkeys.AddClass(HtmlClasses.HorizontalVerticalKeys);
            containerTable.AddElement(hvkeys);

            return containerTable;
        }
开发者ID:alcardac,项目名称:SDMX_DATA_BROWSER,代码行数:24,代码来源:HtmlRenderer.cs

示例3: CreateVerticalTitles

        /// <summary>
        /// Create and setup the titles for vertical dimensions
        /// </summary>
        /// <param name="model">
        /// The DataSetModel to use
        /// </param>
        /// <returns>
        /// The row with the titles
        /// </returns>
        private TableRow CreateVerticalTitles(IDataSetModel model)
        {
            var verticalTitles = new TableRow();
            verticalTitles.AddClass(HtmlClasses.VerticalKeys);
            foreach (string dim in model.VerticalKeys)
            {
                TableCell tableCell = this.CreateTitle(model.AllValidKeys[dim], dim, HtmlClasses.VerticalKeyTitle);
                // new TD();
                verticalTitles.AddElement(tableCell);
            }

            return verticalTitles;
        }
开发者ID:alcardac,项目名称:SDMX_DATA_BROWSER,代码行数:22,代码来源:HtmlRenderer.cs


注:本文中的TableRow.AddElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。