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


C# HtmlControls.HtmlTableRow类代码示例

本文整理汇总了C#中System.Web.UI.HtmlControls.HtmlTableRow的典型用法代码示例。如果您正苦于以下问题:C# HtmlTableRow类的具体用法?C# HtmlTableRow怎么用?C# HtmlTableRow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HtmlTableRow类属于System.Web.UI.HtmlControls命名空间,在下文中一共展示了HtmlTableRow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            HtmlTable table1 = new HtmlTable();
              table1.Border = 1;
              table1.CellPadding = 3;
              table1.CellSpacing = 3;
              table1.BorderColor = "red";

              HtmlTableRow row;
              HtmlTableCell cell;

              for (int i = 1; i <= 5; i++)
              {
            row = new HtmlTableRow();

            row.BgColor = (i % 2 == 0 ? "lightyellow" : "lightcyan");

            for (int j = 1; j <= 4; j++)
            {
              cell = new HtmlTableCell();
              cell.InnerHtml = "Row: " + i.ToString() + "<br /> Cell: " + j.ToString();

              row.Cells.Add(cell);
            }

            table1.Rows.Add(row);
              }

              this.Controls.Add(table1);
        }
开发者ID:bq-wang,项目名称:aspnet,代码行数:30,代码来源:WebForm_CreateServerControls.aspx.cs

示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     //tabelaZlecenia.Rows.Clear();
     DataView view = (DataView)SqlDataZleceniodawcy.Select(DataSourceSelectArguments.Empty);
     DataTable table = view.ToTable();
     DataSet ds = new DataSet();
     ds.Tables.Add(table);
     foreach (DataRow row in ds.Tables[0].Rows)
     {
         HtmlTableRow htmlrow = new HtmlTableRow();
         HtmlTableCell htmlcell = new HtmlTableCell();
         HtmlTableCell htmlcell2 = new HtmlTableCell();
         HtmlTableCell htmlcell3 = new HtmlTableCell();
         HtmlTableCell htmlcell4 = new HtmlTableCell();
         HtmlTableCell htmlcell5 = new HtmlTableCell();
         htmlcell.InnerText = row["Imie"].ToString() + " " + row["Nazwisko"].ToString();
         htmlrow.Cells.Add(htmlcell);
         htmlcell2.InnerText = row["NazwaFirmy"].ToString();
         htmlrow.Cells.Add(htmlcell2);
         htmlcell3.InnerText = row["email"].ToString();
         htmlrow.Cells.Add(htmlcell3);
         htmlcell4.InnerText = row["Telefon"].ToString();
         htmlrow.Cells.Add(htmlcell4);
         htmlcell5.InnerText = row["NIP"].ToString();
         htmlrow.Cells.Add(htmlcell5);
         tabelaZleceniodawcy.Rows.Add(htmlrow);
         tabelaZleceniodawcy.DataBind();
     }
 }
开发者ID:jAANUSZEK0700,项目名称:topdruk24-produkcja,代码行数:29,代码来源:Default.aspx.cs

示例3: LoadWeights

        private void LoadWeights()
        {
            ConnectorDataContext db = new ConnectorDataContext();

            Stopwatch w = Stopwatch.StartNew();
            List<FeatureScore> fScores = db.FeatureScores.ToList();
            w.Stop();
            ILog log = LogManager.GetLogger("QueryLogger");
            log.Info(" Elapsed time: " + w.Elapsed + ", select all feature scores");

            foreach (var item in fScores)
            {
                HtmlTableCell service = new HtmlTableCell();
                HtmlTableCell feature = new HtmlTableCell();
                HtmlTableCell weight = new HtmlTableCell();

                service.InnerText = item.ServiceInstance.name;
                feature.InnerText = item.feature;
                weight.InnerText = item.score.ToString();
                weight.Attributes.Add("class", "center");
                weight.Attributes.Add("contenteditable", "true");

                HtmlTableRow tr = new HtmlTableRow();
                tr.Cells.Add(service);
                tr.Cells.Add(feature);
                tr.Cells.Add(weight);

                WeightTable.Rows.Add(tr);
            }
        }
开发者ID:CosimoLovascio,项目名称:SocialCDE-ProxyServer-VSclient,代码行数:30,代码来源:Weights.aspx.cs

示例4: AddTo

        public override Control AddTo(Control container)
        {
            HtmlTableCell labelCell = new HtmlTableCell();
            Label label = AddLabel(labelCell);

            HtmlTableCell editorCell = new HtmlTableCell();
            Control editor = AddEditor(editorCell);
            if (label != null && editor != null && !string.IsNullOrEmpty(editor.ID))
                label.AssociatedControlID = editor.ID;

            HtmlTableCell extraCell = new HtmlTableCell();
            if (Required)
                AddRequiredFieldValidator(extraCell, editor);
            if (Validate)
                AddRegularExpressionValidator(extraCell, editor);

            AddHelp(extraCell);

            HtmlTableRow row = new HtmlTableRow();
            row.Cells.Add(labelCell);
            row.Cells.Add(editorCell);
            row.Cells.Add(extraCell);

            HtmlTable editorTable = new HtmlTable();
            editorTable.Attributes["class"] = "editDetail";
            editorTable.Controls.Add(row);
            container.Controls.Add(editorTable);

            return editor;
        }
开发者ID:spmason,项目名称:n2cms,代码行数:30,代码来源:EditableFreeTextAreaAttribute.cs

示例5: BindUserGorupMaxspacephotosize

 private void BindUserGorupMaxspacephotosize()
 {
     #region 绑定用户组照片空间大小
     DataTable dt = DatabaseProvider.GetInstance().GetUserGroupMaxspacephotosize();
     int i = 1;
     HtmlTableRow tr = new HtmlTableRow();
     foreach (DataRow dr in dt.Rows)
     {
         if (i % 2 == 1)
         {
             tr = new HtmlTableRow();
         }
         HtmlTableCell td = new HtmlTableCell("td");
         td.Controls.Add(new LiteralControl(dr["grouptitle"].ToString()));
         tr.Cells.Add(td);
         td = new HtmlTableCell("td");
         Discuz.Control.TextBox tb = new Discuz.Control.TextBox();
         tb.ID = "maxspacephotosize" + dr["groupid"].ToString();
         tb.Size = 10;
         tb.MaxLength = 9;
         tb.Text = dr["maxspacephotosize"].ToString();
         tb.RequiredFieldType = "数据校验";
         td.Controls.Add(tb);
         tr.Cells.Add(td);
         tr.Cells.Add(GetTD("maxspacephotosize" + dr["groupid"].ToString()));
         groupphotosize.Rows.Add(tr);
         i++;
     }
     #endregion
 }
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:30,代码来源:albumconfig.aspx.cs

示例6: RefreshCheckpointList

        private void RefreshCheckpointList()
        {
            CheckpointsTable.Rows.Clear();

            HtmlTableRow tr = new HtmlTableRow();

            foreach (JobCheckpoint cp in checkpoints)
            {
                HtmlTableCell value = new HtmlTableCell();
                value.InnerText = cp.Name;

                switch (cp.ExecutionStatus)
                {
                    case JobExecutionState.Unknown:
                    case JobExecutionState.Scheduled:
                        value.Attributes.Add("class", "Checkpoint");
                        break;
                    default:
                        value.Attributes.Add("class", "Checkpoint Checkpoint" + cp.ExecutionStatus.ToString());
                        break;
                }

                tr.Cells.Add(value);
            }

            CheckpointsTable.Rows.Add(tr);
        }
开发者ID:horvatferi,项目名称:graywulf,代码行数:27,代码来源:CheckpointProgress.ascx.cs

示例7: Test

        private void Test()
        {
            string _discountName = "asdfghij";
            //row.Where(r => r.Cells.Any(c => c.InnerText.Contains(discountName)));
            List<HtmlTableRow> _discountTable = new List<HtmlTableRow>();
            for (int _row = 0; _row < 2; _row++)
            {
                HtmlTableRow _newRow = new HtmlTableRow();
                for (int _cells = 0; _cells < 5; _cells++)
                {
                    HtmlTableCell _cell = new HtmlTableCell();
                    _cell.InnerText = "Cell" + _cells.ToString();
                    _newRow.Cells.Add(_cell);
                }
                _discountTable.Add(_newRow);
            }

            List<HtmlTableRow> _resultRows = new List<HtmlTableRow>();
            foreach (HtmlTableRow _htmlTableRow in _discountTable)
            {
                if (_htmlTableRow.Cells.Cast<HtmlTableCell>().Any(_cell => _cell.InnerText.Contains(_discountName)))
                {
                    _resultRows.Add(_htmlTableRow);
                }
            }
        }
开发者ID:ighristov,项目名称:totocheck2,代码行数:26,代码来源:Service1.cs

示例8: AddTopFormControls

        private void AddTopFormControls(HtmlTable table)
        {
            using (HtmlTableRow row = new HtmlTableRow())
            {
                this.AddDateTextBoxCell(row);

                if (this.ShowStore)
                {
                    AddStoreSelectCell(row);
                }

                AddPartyCodeInputTextCell(row);
                AddPartySelectCell(row);

                if (this.ShowPriceTypes)
                {
                    AddPriceTypeSelectCell(row);
                }

                this.AddReferenceNumberInputTextCell(row);
                this.AddCashTransactionDivCell(row);
                this.AddPaymentTermSelectCell(row);

                table.Controls.Add(row);
            }
        }
开发者ID:JonathanValle,项目名称:mixerp,代码行数:26,代码来源:Controls.cs

示例9: btnLiteralTable_Click

        protected void btnLiteralTable_Click(object sender, EventArgs e)
        {
            System.Web.UI.HtmlControls.HtmlTable tableT = new System.Web.UI.HtmlControls.HtmlTable();
            System.Web.UI.HtmlControls.HtmlTableRow rowR = new System.Web.UI.HtmlControls.HtmlTableRow();
            System.Web.UI.HtmlControls.HtmlTableCell cellA = new System.Web.UI.HtmlControls.HtmlTableCell();
            System.Web.UI.HtmlControls.HtmlTableCell cellB = new System.Web.UI.HtmlControls.HtmlTableCell();

            System.Web.UI.HtmlControls.HtmlTableCell cellC = new System.Web.UI.HtmlControls.HtmlTableCell();
            cellA.InnerText = "t2 C1Header";
            cellB.InnerText = "t2 C2Header";
            cellC.InnerText = "t2 C3Header";
            rowR.Cells.Add(cellA);
            rowR.Cells.Add(cellB);
            rowR.Cells.Add(cellC);
            tableT.Rows.Add(rowR);
            cellA = new HtmlTableCell();
            cellB = new HtmlTableCell();
            cellC = new HtmlTableCell();
            rowR = new HtmlTableRow();
            cellA.InnerText = "r1c1";
            cellB.InnerHtml = "r2c2";
            cellC.InnerText = "r3c3";
            rowR.Cells.Add(cellA);
            rowR.Cells.Add(cellB);
            rowR.Cells.Add(cellC);
            tableT.Rows.Add(rowR);

            this.Controls.Add(tableT);
        }
开发者ID:Treasureman1,项目名称:PersonManager,代码行数:29,代码来源:WebForm3.aspx.cs

示例10: LoadUDFs

        public void LoadUDFs()
        {
            var udfList = UDF.GetUDFList(_udfLevel, _levelID);

            if (udfList.Count > 0)
            {
                var udfTable = new HtmlTable();
                udfTable.Attributes["class"] = "fieldValueTable";
                udfTable.Width = "100%";

                foreach (UDF udf in udfList)
                {
                    var tableRow = new HtmlTableRow();
                    var labelCell = new HtmlTableCell();
                    var valueCell = new HtmlTableCell();

                    labelCell.Attributes["class"] = "fieldLabel";
                    labelCell.InnerHtml = udf.Name + ":";

                    valueCell.InnerHtml = udf.Value;

                    tableRow.Cells.Add(labelCell);
                    tableRow.Cells.Add(valueCell);

                    udfTable.Rows.Add(tableRow);

                    udfInformationContainer.Controls.Add(udfTable);
                    udfTable.DataBind();
                }
            }
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:31,代码来源:UDFInformation.ascx.cs

示例11: AddCashTransactionDivCell

        private void AddCashTransactionDivCell(HtmlTableRow row)
        {
            using (HtmlTableCell cell = TableHelper.GetFieldCell())
            {
                if (this.ShowTransactionType)
                {
                    using (HtmlGenericControl toggleCheckBox = HtmlControlHelper.GetToggleCheckBox())
                    {
                        toggleCheckBox.ID = "CashTransactionDiv";
                        using (HtmlInputCheckBox cashTransactionInputCheckBox = new HtmlInputCheckBox())
                        {
                            cashTransactionInputCheckBox.ID = "CashTransactionInputCheckBox";
                            cashTransactionInputCheckBox.Attributes.Add("checked", "checked");
                            toggleCheckBox.Controls.Add(cashTransactionInputCheckBox);
                        }

                        using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.CashTransaction))
                        {
                            toggleCheckBox.Controls.Add(label);
                        }

                        cell.Controls.Add(toggleCheckBox);
                    }
                }

                row.Cells.Add(cell);
            }
        }
开发者ID:JonathanValle,项目名称:mixerp,代码行数:28,代码来源:CashTransaction.cs

示例12: AddTopFormLabels

        private void AddTopFormLabels(HtmlTable table)
        {
            using (HtmlTableRow header = new HtmlTableRow())
            {
                TableHelper.AddCell(header, HtmlControlHelper.GetLabelHtml(Titles.ValueDate, "DateTextBox"));

                if (this.ShowStore)
                {
                    TableHelper.AddCell(header, HtmlControlHelper.GetLabelHtml(Titles.SelectStore, "StoreSelect"));
                }

                TableHelper.AddCell(header, HtmlControlHelper.GetLabelHtml(Titles.SelectParty, "PartyCodeInputText"));
                TableHelper.AddCell(header, string.Empty);

                if (this.ShowPriceTypes)
                {
                    TableHelper.AddCell(header, HtmlControlHelper.GetLabelHtml(Titles.PriceType, "PriceTypeSelect"));
                }

                TableHelper.AddCell(header, HtmlControlHelper.GetLabelHtml(Titles.ReferenceNumberAbbreviated, "ReferenceNumberInputText"));
                TableHelper.AddCell(header, string.Empty);
                TableHelper.AddCell(header, string.Empty);

                table.Rows.Add(header);
            }
        }
开发者ID:hoanien,项目名称:mixerp,代码行数:26,代码来源:Labels.cs

示例13: AddCell

 private HtmlTableCell AddCell(HtmlTableRow row, string text)
 {
     var cell = new HtmlTableCell();
     cell.InnerHtml = text;
     row.Cells.Add(cell);
     return cell;
 }
开发者ID:fathurxzz,项目名称:aleqx,代码行数:7,代码来源:CompareProducts.ascx.cs

示例14: AddRow

 private static HtmlTableRow AddRow(JobControl_Get_Result controlResult)
 {
     HtmlTableRow row = new HtmlTableRow();
     row.Cells.Add(AddLabel(controlResult.ControlName));
     row.Cells.Add(AddControl(controlResult));
     return row;
 }
开发者ID:TCarmack,项目名称:Brentwood,代码行数:7,代码来源:FormBuilder.cs

示例15: BuildStudentGrowthTable

        protected void BuildStudentGrowthTable()
        {
            var table = new HtmlTable();
            var headerRow = new HtmlTableRow();

            table.Width = "100%";
            table.Attributes["class"] = "sgTable";

            //Add header row
            foreach(DataColumn column in _ds.Tables[1].Columns)
            {
                var headerCell = new HtmlTableCell();
                headerCell.Attributes["class"] = "sgTableHeadCell";
                headerCell.InnerHtml = column.ColumnName;
                headerRow.Cells.Add(headerCell);
            }
            table.Rows.Add(headerRow);
            
            //Add body rows
            foreach(DataRow row in _ds.Tables[1].Rows)
            {
                var tableRow = new HtmlTableRow();
                foreach(DataColumn column in _ds.Tables[1].Columns)
                {
                    var tableCell = new HtmlTableCell();
                    tableCell.Attributes["class"] = table.Rows.Count % 2 == 0 ? "" : "altTD";
                    tableCell.InnerHtml = row[column].ToString();
                    tableRow.Cells.Add(tableCell);
                }
                table.Rows.Add(tableRow);
            }

            if (_ds.Tables[1].Rows.Count > 1 || (_ds.Tables[1].Rows.Count > 0 && !_ds.Tables[1].Rows[0][0].ToString().Contains("N/A")))
            {

                //Add spacer row
                var spacerRow = new HtmlTableRow();
                var spacerCell = new HtmlTableCell();
                spacerCell.ColSpan = _ds.Tables[1].Columns.Count;
                spacerCell.InnerHtml = "&nbsp;";
                spacerCell.BgColor = "bababa";
                spacerRow.Cells.Add(spacerCell);
                table.Rows.Add(spacerRow);

                //Add aggregate concordant row
                var concordRow = new HtmlTableRow();
                var concordCell1 = new HtmlTableCell();
                var concordCell2 = new HtmlTableCell();
                concordCell1.ColSpan = _ds.Tables[1].Columns.Count - 1;
                concordCell2.InnerHtml = "Aggregate Concordant = <span class=\"normalText\">" + _aggregateConcordant + "</span>";
                concordCell2.Attributes["class"] = "sgTableHeadCell";
                concordRow.Cells.Add(concordCell1);
                concordRow.Cells.Add(concordCell2);
                table.Rows.Add(concordRow);
            }

            //Add table to panel
            studentGrowDataTable.Controls.Add(table);
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:59,代码来源:StudentGrowthData.aspx.cs


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