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


C# WebControls.GridViewRowEventArgs类代码示例

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


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

示例1: grdCourses_RowDataBound

        protected void grdCourses_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (IsPostBack)
            {
                if (e.Row.RowType == DataControlRowType.Header)
                {
                    Image SortImage = new Image();

                    for (int i = 0; i <= grdCourses.Columns.Count - 1; i++)
                    {
                        if (grdCourses.Columns[i].SortExpression == Session["SortColumn"].ToString())
                        {
                            if (Session["SortDirection"].ToString() == "DESC")
                            {
                                SortImage.ImageUrl = "/images/desc.jpg";
                                SortImage.AlternateText = "Sort Descending";
                            }
                            else
                            {
                                SortImage.ImageUrl = "/images/asc.jpg";
                                SortImage.AlternateText = "Sort Ascending";
                            }

                            e.Row.Cells[i].Controls.Add(SortImage);

                        }
                    }
                }

            }
        }
开发者ID:ifotn,项目名称:comp2007-lesson10-mon,代码行数:31,代码来源:courses.aspx.cs

示例2: gvScore_RowDataBound

        protected void gvScore_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //����ƶ���ÿ��ʱ��ɫ����Ч��
                e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#c1ebff'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
                //�����������ָ����״Ϊ"С��"
                e.Row.Attributes["style"] = "Cursor:hand";

                    LinkButton lbtName = e.Row.FindControl("lbtnName") as LinkButton;
                    Button btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                    if (lbtName.Text == "���")
                    {
                        int basid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["DriverScoreId"].ToString());
                        DriverScoreInfo ds = new DriverScoreInfo(basid);
                        if (ds.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }
                    }
                    else if (lbtName.Text == "�Ų�")
                    {
                        int fid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["NurseScoreId"].ToString());
                        NurseScoreInfo ma = new NurseScoreInfo(fid);
                        if (ma.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }

                    }
                }
        }
开发者ID:xingfudaiyan,项目名称:OA,代码行数:33,代码来源:Assistantgv.aspx.cs

示例3: gridView_OnRowCreated

 protected void gridView_OnRowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Header)
     {
         //e.Row.Cells[0].Text = "<input id='Checkbox2' type='checkbox' onclick='CheckAll()'/><label></label>";
     }
 }
开发者ID:LuckyXuan,项目名称:lvaiServer,代码行数:7,代码来源:List.aspx.cs

示例4: GridViewOrders_RowCreated

 // adds glyph to header according to current sort settings.
 
 protected void GridViewOrders_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Header)
     {
         AddGlyph(this.GridViewOrders, e.Row);
     }
 }
开发者ID:tuansolo,项目名称:CodeBase,代码行数:9,代码来源:Orders.aspx.cs

示例5: grdBusqueda_RowDataBound

 protected void grdBusqueda_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         e.Row.Attributes["OnClick"] = "return GetSelectedRowC(this);";
     }
 }
开发者ID:borisgr04,项目名称:ByASircc4v2016,代码行数:7,代码来源:GCConsContrato.aspx.cs

示例6: grdMain_RowDataBound

        protected void grdMain_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            int cellIndex;
            string puntaje = "";

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                cellIndex = 0;
                foreach (TableCell celda in e.Row.Cells)
                {
                    if ((cellIndex + 1) != e.Row.Cells.Count)
                    {
                        var ddlCtl = (DropDownList)e.Row.FindControl("ptext" + cellIndex);
                        var lblCtl = (Label)e.Row.FindControl("ptl" + cellIndex);
                        if (ddlCtl != null)
                        {
                            string valorAnterior = ddlCtl.Text;
                            ddlCtl.Items.Clear();
                            ddlCtl.Items.Add(new ListItem("N/A", "-1"));
                            ddlCtl.Items.Add(new ListItem("0", "0"));
                            ddlCtl.Items.Add(new ListItem(puntaje, puntaje));
                            ddlCtl.Text = valorAnterior;
                        }

                        if (lblCtl != null)
                            puntaje = lblCtl.Text;
                    }
                    cellIndex++;
                }
            }
        }
开发者ID:Avaruz,项目名称:Artemisa2,代码行数:31,代码来源:HallazgosAuditoria.aspx.cs

示例7: StudentsGridView_RowDataBound

        protected void StudentsGridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (IsPostBack)
            {
                //if header row has been clicked
                if (e.Row.RowType == DataControlRowType.Header)
                {
                    LinkButton linkButton = new LinkButton();

                    for (int index = 0; index < StudentsGridView.Columns.Count - 1; index++)
                    {
                        if (StudentsGridView.Columns[index].SortExpression == Session["SortColumn"].ToString())
                        {
                            if (Session["SortDirection"].ToString() == "ASC")
                            {
                                linkButton.Text = "<i class='fa fa-caret-up fa-lg'></i>";
                            }
                            else
                            {
                                linkButton.Text = "<i class='fa fa-caret-down fa-lg'></i>";
                            }

                            e.Row.Cells[index].Controls.Add(linkButton);
                        }
                    }
                }
            }
        }
开发者ID:chinzo94,项目名称:COMP2007-S2016-Week6,代码行数:28,代码来源:Students.aspx.cs

示例8: GridView1_RowCreated

        protected void GridView1_RowCreated(Object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {

            }
        }
开发者ID:pcstx,项目名称:OA,代码行数:7,代码来源:DeleteMail.aspx.cs

示例9: gvList_RowDataBound

        protected void gvList_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label lblUserType = e.Row.FindControl("lblUserType") as Label;
                NoName.NetShop.ShopFlow.ExpressInfoModel model = e.Row.DataItem as NoName.NetShop.ShopFlow.ExpressInfoModel;
                MemberType userType = (MemberType)model.UserType;
                UserLevel userLevel = (UserLevel)model.UserLevel;
                switch (userType)
                {
                    case MemberType.Personal:
                        lblUserType.Text = userLevel.ToString();
                        break;
                    case MemberType.Company:
                        lblUserType.Text = "鼎企会员";
                        break;
                    case MemberType.Famly:
                        lblUserType.Text = "鼎宅会员";
                        break;
                    case MemberType.School:
                        lblUserType.Text = "鼎校会员";
                        break;
                    default:
                        lblUserType.Text = userLevel.ToString();
                        break;
                }

            }
        }
开发者ID:ViniciusConsultor,项目名称:noname-netshop,代码行数:29,代码来源:ExpressShipFee.aspx.cs

示例10: GridView1_RowDataBound1

 protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         ((LinkButton)e.Row.Cells[0].Controls[0]).OnClientClick = "if(!confirm('確定要刪除嗎'))return false;";
     }
 }
开发者ID:huaminglee,项目名称:yunshanoa,代码行数:7,代码来源:MeetingRoomManager.aspx.cs

示例11: gv_detalle_equipos_RowDataBound

 protected void gv_detalle_equipos_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Header)
     {
         e.Row.ControlStyle.BackColor = Color.LightGray;
     }
 }
开发者ID:jfberton,项目名称:SisEquiposBertoncini,代码行数:7,代码来源:planilla_resumen_valores_equipo_categoria.aspx.cs

示例12: GridView1_RowDataBound

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                // Set the hand mouse cursor for the selected row.
                e.Row.Attributes.Add("OnMouseOver", "this.style.cursor = 'hand'; this.style.background = '#003366';");
                e.Row.Attributes.Add("OnMouseOut", "this.style.background = '#F9F6F4';");

                // The seelctButton exists for ensuring the selection functionality
                // and bind it with the appropriate event hanlder.
                LinkButton selectButton = new LinkButton()
                {
                    CommandName = "Select",
                    Text = e.Row.Cells[0].Text
                };
                selectButton.Font.Underline = false;
                selectButton.ForeColor = System.Drawing.Color.Black;

                e.Row.Cells[0].Controls.Add(selectButton);
                //e.Row.Attributes["OnClick"] =
                // Page.ClientScript.GetPostBackClientHyperlink(selectButton, "");

                e.Row.Attributes["OnClick"] = Page.ClientScript.GetPostBackClientHyperlink((Control)sender, "Select$" + e.Row.RowIndex);

            }
        }
开发者ID:Elpulgo,项目名称:PulgoIntranet,代码行数:26,代码来源:SentMail.aspx.cs

示例13: demo_RowCreated

 void demo_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.Header)
     {
         e.Row.TableSection = TableRowSection.TableHeader;
     }
 }
开发者ID:tforsberg,项目名称:z,代码行数:7,代码来源:HeaderIcons.aspx.cs

示例14: gvPrivilegeList_RowDataBound

 protected void gvPrivilegeList_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         e.Row.Attributes["style"] = "Cursor:pointer";
     }
 }
开发者ID:dalinhuang,项目名称:cy-common,代码行数:7,代码来源:PrivilegeList.aspx.cs

示例15: CreateIntroText

        public void CreateIntroText(object sender, GridViewRowEventArgs e)
        {
            string val = string.Empty;

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                DataRow dr = ((DataRowView)e.Row.DataItem).Row;
                TextBox txtEditQuantity = (TextBox)e.Row.FindControl("txtEditQuantity");

                txtEditQuantity.Attributes.Add("data-productnumber", dr["ProductNumber"].ToString());
                txtEditQuantity.Attributes.Add("data-originalvalue", dr["Quantity"].ToString());
                txtEditQuantity.Text = dr["Quantity"].ToString();

                if (dataRowCount == 0)
                {
                    // first text field
                    txtEditQuantity.Attributes.Add("data-intro", "When this value is changed, and you move on to another textbox, it will immediately be saved. A successful save is confirmed by the checkbox icon.");
                    txtEditQuantity.Attributes.Add("data-step", "3");
                    txtEditQuantity.Attributes.Add("data-position", "left");

                    // first product id link
                    HyperLink hlnkProduct = (HyperLink)e.Row.FindControl("hlnkProduct");
                    hlnkProduct.Attributes.Add("data-intro", "This loads the product page.");
                    hlnkProduct.Attributes.Add("data-step", "4");
                }

                dataRowCount++;
            }
        }
开发者ID:benharrison,项目名称:tIMS,代码行数:29,代码来源:Default.aspx.cs


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