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


C# BoundColumn.Initialize方法代码示例

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


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

示例1: GetColumn

 private System.Web.UI.WebControls.BoundColumn GetColumn(string dataField, string headerText, System.Web.UI.WebControls.HorizontalAlign alignment)
 {
     System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
     colBound.DataField = dataField;
     colBound.HeaderText = headerText;
     colBound.Initialize();
     colBound.HeaderStyle.CssClass = "ektronTitlebar";
     colBound.ItemStyle.Wrap = true;
     colBound.ItemStyle.HorizontalAlign = alignment;
     colBound.ItemStyle.CssClass = "history-list";
     colBound.HeaderStyle.Height = Unit.Empty;
     return colBound;
 }
开发者ID:jaytem,项目名称:minGit,代码行数:13,代码来源:historylist.aspx.cs

示例2: LoadGrid

    protected void LoadGrid()
    {
        System.Web.UI.WebControls.BoundColumn cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fDelete";
            cb.HeaderText = "<input type=\"checkbox\" onclick=\"MsgInboxToggleAllCB(this);\" name=\"MsgInboxMasterCB\" value=\"" + "ID" + "\" runat=\"Server\"/>";
            cb.Initialize();
            cb.HeaderStyle.CssClass = "center checkBoxColumn";
            cb.ItemStyle.CssClass = "center checkBoxColumn";
            _dg.Columns.Add(cb);

            cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fFrom";
            if (SentMode)
            {
                cb.HeaderText = GetMessage("lbl generic to");
            }
            else
            {
                cb.HeaderText = GetMessage("lbl generic from");
            }
            cb.Initialize();
            _dg.Columns.Add(cb);

            cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fSubject";
            cb.HeaderText = GetMessage("lbl generic subject");
            cb.Initialize();
            _dg.Columns.Add(cb);

            cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fDate";
            cb.HeaderText = GetMessage("lbl generic date");
            cb.Initialize();
            _dg.Columns.Add(cb);

            _dg.DataSource = CreateMsgData();
            _dg.DataBind();
    }
开发者ID:jaytem,项目名称:minGit,代码行数:38,代码来源:ViewMessages.ascx.cs

示例3: Populate_ViewFriendsGrid

    private void Populate_ViewFriendsGrid(FriendInvitation[] data)
    {
        System.Web.UI.WebControls.BoundColumn colBound;

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "CHECKL";
        colBound.HeaderText = "<input type=\"checkbox\" onclick=\"checkAll(this);\" name=\"FriendsMasterCB\" value=\"" + "ID" + "\" runat=\"Server\"/>";
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(1);
        colBound.Initialize();
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_AVATAR";
        colBound.HeaderText = this.GetMessage("lbl avatar");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_DISPLAYNAME";
        colBound.HeaderText = this.GetMessage("generic display name");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(25);
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_FIRSTNAME";
        colBound.HeaderText = this.GetMessage("generic first name");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(25);
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.Wrap = false;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_LASTNAME";
        colBound.HeaderText = this.GetMessage("generic last name");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(25);
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.Wrap = false;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_SENTDATE";
        colBound.HeaderText = this.GetMessage("lbl generic date");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(10);
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.Wrap = false;
        FriendGrid.Columns.Add(colBound);

        PageSettings();

        DataTable dt = new DataTable();
        DataRow dr;
        dt.Columns.Add(new DataColumn("CHECKL", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_AVATAR", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_DISPLAYNAME", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_FIRSTNAME", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_LASTNAME", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_SENTDATE", typeof(string)));
        int i = 0;

        if (!(data == null))
        {
            for (i = 0; i <= data.Length - 1; i++)
            {
                dr = dt.NewRow();
                dr["CHECKL"] = "<input type=\"checkbox\" name=\"req_selected_users\" value=\"" + ((data[i].Recipient.IsUser) ? (data[i].Recipient.UserId.ToString()) : (data[i].Recipient.Email)) + "\" >";
                dr["COL_AVATAR"] = "<img class=\"friendsAvatar\" align=\"left\" src=\"" + ((data[i].Recipient.Avatar != "") ? (AppendSitePathIfNone(data[i].Recipient.Avatar)) : this.m_refContentApi.AppImgPath + "user.gif") + "\" width=\"32\" height=\"32\"/>";
                if (data[i].Recipient.IsUser)
                {
                    dr["COL_DISPLAYNAME"] = data[i].Recipient.DisplayName;
                    dr["COL_FIRSTNAME"] = data[i].Recipient.FirstName;
                    dr["COL_LASTNAME"] = data[i].Recipient.LastName;
                }
                else
                {
                    dr["COL_DISPLAYNAME"] = data[i].Recipient.Email;
                    dr["COL_FIRSTNAME"] = "";
                    dr["COL_LASTNAME"] = "";
                }

                dr["COL_SENTDATE"] = data[i].RequestDate.ToString("g");

                dt.Rows.Add(dr);
            }
        }

        DataView dv = new DataView(dt);
        FriendGrid.DataSource = dv;
        FriendGrid.DataBind();
//.........这里部分代码省略.........
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:MySentFriends.aspx.cs

示例4: Populate_ViewForm

    private void Populate_ViewForm(FormData form_data)
    {
        ViewFormPropertiesGrid.AutoGenerateColumns = false;
            System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
            colBound.DataField = "NAME";
            colBound.Initialize();
            colBound.ItemStyle.CssClass = "label";
            colBound.HeaderStyle.Height = Unit.Empty;
            ViewFormPropertiesGrid.Columns.Add(colBound);

            colBound = new System.Web.UI.WebControls.BoundColumn();
            colBound.DataField = "TITLE";
            ViewFormPropertiesGrid.Columns.Add(colBound);
            ViewFormPropertiesGrid.BackColor = System.Drawing.Color.White;
            DataTable dt = new DataTable();
            DataRow dr;

            dt.Columns.Add(new DataColumn("NAME", typeof(string)));
            dt.Columns.Add(new DataColumn("TITLE", typeof(string)));

            dr = dt.NewRow();
            dr[0] = m_refMsg.GetMessage("lbl form title") + ":";
            dr[1] = form_data.Title;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr[0] = m_refMsg.GetMessage("lbl formid") + ":";
            dr[1] = form_data.Id;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr[0] = m_refMsg.GetMessage("tab linkcheck status") + ":";
            switch (form_data.Status.ToLower())
            {
                case "a":
                    dr[1] = m_refMsg.GetMessage("status:Approved (Published)");
                    break;
                case "o":
                    dr[1] = m_refMsg.GetMessage("status:Checked Out");
                    break;
                case "i":
                    dr[1] = m_refMsg.GetMessage("status:Checked In");
                    break;
                case "p":
                    dr[1] = m_refMsg.GetMessage("status:Approved (PGLD)");
                    break;
                case "m":
                    dr[1] = "<font color=\"Red\">" + m_refMsg.GetMessage("status:Submitted for Deletion") + "</font>";
                    break;
                case "s":
                    dr[1] = "<font color=\"Red\">" + m_refMsg.GetMessage("status:Submitted for Approval") + "</font>";
                    break;
                case "t":
                    dr[1] = m_refMsg.GetMessage("status:Waiting Approval");
                    break;
            }
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr[0] = m_refMsg.GetMessage("description label");
            dr[1] = form_data.Description;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr[0] = m_refMsg.GetMessage("lbl form data") + ":";
            bool bMail = false;
            bool bDatabase = false;
            bool bAutofillForm = false;
            int lPos = 0;
            string strFormData = "";
            string strFormSubmission = "";

            bAutofillForm = form_data.Autofill;
            lPos = form_data.StoreDataTo.IndexOf(",$");
            if (lPos > -1)
            {
                strFormData = m_refModule.IsEmailOrDb(form_data.StoreDataTo);
                strFormSubmission = form_data.StoreDataTo.Substring(lPos + 2);
            }
            else
            {
                strFormData = form_data.StoreDataTo;
            }

            //If (strFormData = "") Then
            //    bMail = True
            //End If
            if (strFormData == "mail")
            {
                bMail = true;
            }
            if (strFormData == "db")
            {
                bDatabase = true;
            }
            if (strFormData == "both")
            {
                bMail = true;
                bDatabase = true;
            }
//.........这里部分代码省略.........
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:viewform.ascx.cs

示例5: Populate_ViewFriendsGrid

    private void Populate_ViewFriendsGrid(DirectoryUserData[] data)
    {
        System.Web.UI.WebControls.BoundColumn colBound;
        string sAppend = "";

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "CHECKL";
        colBound.HeaderText = "<input type=\"checkbox\" onclick=\"checkAll(this);\" name=\"FriendsMasterCB\" value=\"" + "ID" + "\" runat=\"Server\"/>";
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(1);
        colBound.Initialize();
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "SEL";
        colBound.HeaderText = this.GetMessage("lbl selected friend");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(1);
        colBound.Initialize();
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_AVATAR";
        colBound.HeaderText = this.GetMessage("lbl avatar");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_DISPLAYNAME";
        colBound.HeaderText = this.GetMessage("generic display name");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(30);
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_FIRSTNAME";
        colBound.HeaderText = this.GetMessage("generic first name");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(30);
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.Wrap = false;
        FriendGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COL_LASTNAME";
        colBound.HeaderText = this.GetMessage("generic last name");
        colBound.HeaderStyle.CssClass = "friendsHeader";
        colBound.HeaderStyle.Width = Unit.Percentage(30);
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Middle;
        colBound.ItemStyle.Wrap = false;
        FriendGrid.Columns.Add(colBound);

        PageSettings();

        DataTable dt = new DataTable();
        DataRow dr;
        dt.Columns.Add(new DataColumn("CHECKL", typeof(string)));
        dt.Columns.Add(new DataColumn("SEL", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_AVATAR", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_DISPLAYNAME", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_FIRSTNAME", typeof(string)));
        dt.Columns.Add(new DataColumn("COL_LASTNAME", typeof(string)));
        int i = 0;

        if (!(data == null))
        {
            for (i = 0; i <= data.Length - 1; i++)
            {
                dr = dt.NewRow();
                sAppend = "";
                if ((setting_data.ADAuthentication == 1) && (data[i].Domain != ""))
                {
                    sAppend = "@" + data[i].Domain;
                }
                dr["CHECKL"] = "<input type=\"checkbox\" name=\"req_deleted_users\" id=\"req_deleted_users\" value=\"" + data[i].Id + "\" >";
                if (this.IsSelectedFriend(System.Convert.ToInt32(data[i].Id)))
                {
                    dr["SEL"] = "<img src=\"" + this.m_refContentApi.AppImgPath + "check20.gif\"/>";
                }
                else
                {
                    dr["SEL"] = "&nbsp;";
                }
                dr["COL_AVATAR"] = "<img class=\"friendsAvatar\" align=\"left\" src=\"" + ((data[i].Avatar != "") ? (AppendSitePathIfNone((string)(data[i].Avatar))) : this.m_refContentApi.AppImgPath + "user.gif") + "\" width=\"32\" height=\"32\"/>";
                dr["COL_DISPLAYNAME"] = data[i].DisplayName;
                dr["COL_FIRSTNAME"] = data[i].FirstName;
                dr["COL_LASTNAME"] = data[i].LastName;
                dt.Rows.Add(dr);
            }
        }
//.........这里部分代码省略.........
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:MyFriends.aspx.cs

示例6: GetColumn

    private System.Web.UI.WebControls.BoundColumn GetColumn(string dataField, string headerText, bool wrap, string cssClass)
    {
        System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();

            colBound.DataField = dataField;
            colBound.HeaderText = headerText;
            colBound.Initialize();
            colBound.HeaderStyle.CssClass = cssClass;

            if (dataField.ToLower() == "comments")
            {
                colBound.ItemStyle.Width = Unit.Parse("450");
            }
            colBound.ItemStyle.Wrap = wrap;
            colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
            colBound.ItemStyle.CssClass = "history-list";
            colBound.HeaderStyle.Height = Unit.Empty;
            return colBound;
    }
开发者ID:jaytem,项目名称:minGit,代码行数:19,代码来源:ViewHistoryList.ascx.cs

示例7: Populate_EntryHistoryListGrid


//.........这里部分代码省略.........
                int[] minorarray = new int[entry_version_list.Count + 1];
                for (int i = 0; i <= (entry_version_list.Count - 1); i++)
                {
                    if (entry_version_list[i].Status == "A")
                    {
                        minorarray[numMajors] = minorRev;
                        numMajors++;
                        minorRev = 0;
                    }
                    else
                    {
                        minorRev++;
                    }
                }
                minorarray[numMajors] = minorRev; // This is really fist 1
                minorRev = minorarray[pntr];
                for (int i = 0; i <= (entry_version_list.Count - 1); i++)
                {
                    dr = dt.NewRow();
                    //class=""history-list""
                    strLink = "<a href=\"history.aspx?LangType=" + entry_version_list[i].Entry.LanguageId + "&hist_id=" + entry_version_list[i].VersionId + "&Id=" + Id + "\" target=\"history_frame\" title=\"" + m_refMsg.GetMessage("view this version msg") + "\">";

                    dr[1 + offset] = strLink;

                    if (entry_version_list[i].Status == "A")
                    {

                        minorRev = 0;
                        dr[offset] = numMajors + ".0";
                        pntr++;
                        minorRev = minorarray[pntr];
                        numMajors--;

                        string radiochecked = "";
                        if (firstRadio)
                        {
                            firstRadio = false;
                            radiochecked = "checked ";
                        }

                        dr[1 + offset] += "<img src=\"" + m_refContentApi.AppPath + "Images/ui/icons/forward.png\" align=\"bottom\" alt=\"Published\" title=\"Published\" />";
                        dr[1 + offset] += entry_version_list[i].Date.ToShortDateString() + " " + entry_version_list[i].Date.ToShortTimeString();
                        if (_analyticsEnabled)
                        {
                            dr[0] = "<span class=\"compare_option_primary\"><input class=\"compare\" value=\"" + entry_version_list[i].VersionId + "\" id=\"oldid\" name=\"oldid\" type=\"radio\" " + radiochecked + "/></span>";
                            dr[0] += "<span class=\"compare_option_secondary\"><input class=\"compare\" value=\"" + entry_version_list[i].VersionId + "\" id=\"diff\" name=\"diff\" type=\"radio\" " + radiochecked + "/></span>";
                        }

                        majorVersions++;

                    }
                    else
                    {
                        dr[offset] = numMajors + "." + minorRev;
                        minorRev--;
                        dr[1 + offset] += "<div style=\'margin-left:15px;\'>" + entry_version_list[i].Date.ToShortDateString() + " " + entry_version_list[i].Date.ToShortTimeString() + "</div>";

                    }
                    dr[1 + offset] += "</a>";
                    dr[2 + offset] = strLink + entry_version_list[i].Entry.Title.ToString() + "</a>";
                    dr[3 + offset] = "<a href=\"#\" onclick=\"EmailUser(" + entry_version_list[i].UserId.ToString() + ", \'" + m_refMsg.GetMessage("btn email") + "\'); return false;\">";
                    dr[3 + offset] += "<img alt=\"" + m_refMsg.GetMessage("btn email") + "\" title=\"" + m_refMsg.GetMessage("btn email") + "\" src=\"" + m_refContentApi.AppPath + "Images/ui/icons/email.png\" />&#160;";
                    dr[3 + offset] += entry_version_list[i].Entry.LastEditorFirstName + " " + entry_version_list[i].Entry.LastEditorLastName + "</a>";
                    dr[4 + offset] = entry_version_list[i].Comment;

                    dt.Rows.Add(dr);
                }

                _analyticsEnabled = System.Convert.ToBoolean(majorVersions > 1);

            }
            else
            {
                System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
                colBound.DataField = "EkVersion";
                colBound.HeaderText = m_refMsg.GetMessage("lbl history status");
                colBound.HeaderStyle.CssClass = "title-header";
                colBound.Initialize();
                colBound.ItemStyle.Wrap = false;
                colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
                colBound.ItemStyle.CssClass = "history-list";
                colBound.HeaderStyle.Height = Unit.Empty;
                HistoryListGrid.Columns.Add(colBound);

                dt.Columns.Add(new DataColumn("EkVersion", typeof(string)));

                DataRow dr;
                dr = dt.NewRow();
                dr[0] = m_refMsg.GetMessage("msg current history");
                dt.Rows.Add(dr);

                _analyticsEnabled = false;

            }

            DataView dv = new DataView(dt);

            HistoryListGrid.DataSource = dv;
            HistoryListGrid.DataBind();
    }
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:ViewHistoryList.ascx.cs

示例8: GetHistoryList


//.........这里部分代码省略.........
                        minorRev = 0;
                    }
                    else
                    {
                        minorRev++;
                    }
                }
                minorarray[numMajors] = minorRev; // This is really fist 1
                minorRev = minorarray[pntr];
                for (i = 0; i <= content_history_list.Length - 1; i++)
                {
                    dr = dt.NewRow();
                    //class=""history-list""
                    strLink = "<a href=\"history.aspx?LangType=" + content_history_list[i].LanguageId + "&hist_id=" + content_history_list[i].Id + "&Id=" + id + "\" target=\"history_frame\" title=\"" + m_refMsg.GetMessage("view this version msg") + "\">";
                    dr[1 + offset] = strLink;
                    if (content_history_list[i].Status == "A")
                    {

                        minorRev = 0;
                        dr[offset] = numMajors + ".0";
                        pntr++;
                        minorRev = minorarray[pntr];
                        numMajors--;

                        string radiochecked = "";
                        string nextradiochecked = "";
                        if (firstRadio)
                        {
                            firstRadio = false;
                            radiochecked = "checked ";
                        }
                        else if (nextRadio)
                        {
                            nextRadio = false;
                            nextradiochecked = "checked ";
                        }

                        dr[1 + offset] += "<img src=\"" + m_refContentApi.AppPath + "Images/ui/icons/forward.png\" align=\"bottom\" alt=\"Published\" title=\"Published\" />";
                        dr[1 + offset] += content_history_list[i].DateInserted.ToShortDateString() + " " + content_history_list[i].DateInserted.ToShortTimeString();
                        if (_analyticsEnabled)
                        {
                            dr[0] = "<span class=\"compare_option_primary\"><input class=\"compare\" value=\"" + content_history_list[i].Id + "\" name=\"oldid\" type=\"radio\" " + radiochecked + "/></span>";
                            dr[0] += "<span class=\"compare_option_secondary\"><input class=\"compare\" value=\"" + content_history_list[i].Id + "\" name=\"diff\" type=\"radio\" " + nextradiochecked + "/></span>";
                        }

                        majorVersions++;

                    }
                    else
                    {

                        dr[offset] = numMajors + "." + minorRev;
                        minorRev--;
                        dr[1 + offset] += "<div style=\'margin-left:15px;\'>" + content_history_list[i].DateInserted.ToShortDateString() + " " + content_history_list[i].DateInserted.ToShortTimeString() + "</div>";

                    }
                    dr[1 + offset] += "</a>";
                    dr[2 + offset] = strLink + content_history_list[i].Title.ToString() + "</a>";
                    if (content_history_list[i].DisplayName != "")
                    {
                        dr[3 + offset] = content_history_list[i].DisplayName;
                    }
                    else
                    {
                        dr[3 + offset] = content_history_list[i].UserName;
                    }
                    dr[4 + offset] = content_history_list[i].Comment;

                    dt.Rows.Add(dr);
                }

                _analyticsEnabled = System.Convert.ToBoolean(majorVersions > 1);

            }
            else
            {
                System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
                colBound.DataField = "EkVersion";
                colBound.HeaderText = m_refMsg.GetMessage("lbl history status");
                colBound.HeaderStyle.CssClass = "title-header";
                colBound.Initialize();
                colBound.ItemStyle.Wrap = false;
                colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
                colBound.ItemStyle.CssClass = "history-list";
                colBound.HeaderStyle.Height = Unit.Empty;
                HistoryListGrid.Columns.Add(colBound);

                dt.Columns.Add(new DataColumn("EkVersion", typeof(string)));

                DataRow dr;
                dr = dt.NewRow();
                dr[0] = m_refMsg.GetMessage("msg current history");
                dt.Rows.Add(dr);

                _analyticsEnabled = false;

            }

            return dt;
    }
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:ViewHistoryList.ascx.cs

示例9: SetupStatisticsGrid

    public void SetupStatisticsGrid()
    {
        System.Web.UI.WebControls.BoundColumn column = new System.Web.UI.WebControls.BoundColumn();
            column.DataField = "ObjectType";
            column.HeaderText = m_containerPage.RefMsg.GetMessage("lbl tagged type"); //"Type"
            column.HeaderStyle.CssClass = "ptagsHeaderType";
            column.Initialize();
            column.ItemStyle.Wrap = false;
            column.ItemStyle.VerticalAlign = VerticalAlign.Middle;
            column.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
            tagStatsGrid.Columns.Add(column);

            column = new System.Web.UI.WebControls.BoundColumn();
            column.DataField = "TaggedCount";
            column.HeaderText = m_containerPage.RefMsg.GetMessage("lbl times used"); // "Times Used"
            column.HeaderStyle.CssClass = "ptagsHeaderTagCount";
            column.Initialize();
            column.ItemStyle.Wrap = false;
            column.ItemStyle.VerticalAlign = VerticalAlign.Middle;
            column.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
            tagStatsGrid.Columns.Add(column);
    }
开发者ID:jaytem,项目名称:minGit,代码行数:22,代码来源:ViewTag.ascx.cs

示例10: LoadGrid

    protected void LoadGrid()
    {
        if (! string.IsNullOrEmpty(Request.QueryString["orderBy"]))
            {
                m_sortOrderBy = (TagOrderBy)Convert.ToInt32(Request.QueryString["orderBy"]);
            }

            if (! string.IsNullOrEmpty(Request.QueryString["order"]))
            {
                m_sortOrder = Convert.ToString(Request.QueryString["order"]);
            }

            System.Web.UI.WebControls.BoundColumn cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fId";
            cb.HeaderText = m_containerPage.RefMsg.GetMessage("generic id"); //"ID"
            cb.Initialize();
            _dg.Columns.Add(cb);

            cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fName";
            //cb.HeaderText = m_containerPage.RefMsg.GetMessage("generic name") ' "Name"
            cb.HeaderText = "<a href=\"personaltags.aspx?orderBy=" + TagOrderBy.Text + "&order=" + (m_sortOrderBy == TagOrderBy.Text && m_sortOrder == "asc" ? "desc" : "asc") + "\">" + m_containerPage.RefMsg.GetMessage("generic name") + "</a>";
            cb.Initialize();
            _dg.Columns.Add(cb);

            cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fTotal";
            //cb.HeaderText = m_containerPage.RefMsg.GetMessage("lbl times used") ' "Times Used"
            cb.HeaderText = "<a href=\"personaltags.aspx?orderBy=" + TagOrderBy.TaggedCount + "&order=" + (m_sortOrderBy == TagOrderBy.TaggedCount && m_sortOrder == "asc" ? "desc" : "asc") + "\">" + m_containerPage.RefMsg.GetMessage("lbl times used") + "</a>";
            cb.Initialize();
            _dg.Columns.Add(cb);

            cb = new System.Web.UI.WebControls.BoundColumn();
            cb.DataField = "fLanguage";
            cb.HeaderText = m_containerPage.RefMsg.GetMessage("generic language"); // "Language"
            cb.Initialize();
            _dg.Columns.Add(cb);

            _dg.DataSource = CreateMsgData();
            _dg.DataBind();

            LoadPageSettings();
    }
开发者ID:jaytem,项目名称:minGit,代码行数:43,代码来源:ViewAllTags.ascx.cs


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