• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DataGridItemEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ProjectionList_ItemDataBound

 void ProjectionList_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     string memo = e.Item.Cells[2].Text;
       memo = memo.Replace("\r\n", "<br />");
       memo = memo.Replace("\n", "<br />");
       e.Item.Cells[2].Text = memo;
 }
开发者ID:weavver,项目名称:weavver,代码行数:7,代码来源:Accounting_RecurringBillables.ascx.cs


示例2: gridManage_ItemDataBound

    public void gridManage_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        switch (e.Item.ItemType)
        {
            case ListItemType.AlternatingItem:
            case ListItemType.Item:
            case ListItemType.SelectedItem:
            case ListItemType.EditItem:
                int id = int.Parse(e.Item.Cells[(int)Cells.id].Text);
                bool verified = bool.Parse(e.Item.Cells[(int)Cells.verified].Text);
                bool failed = bool.Parse(e.Item.Cells[(int)Cells.failed].Text);
                string address = e.Item.Cells[(int)Cells.address].Text;
                bool principal = bool.Parse(e.Item.Cells[(int)Cells.principal].Text);

                if (verified && ! failed)
                {
                    e.Item.Cells[(int)Cells.resend].Text = string.Empty;
                }

                if (principal || !verified)
                {
                    e.Item.Cells[(int)Cells.setprincipal].Text = string.Empty;
                }

                break;
        }
    }
开发者ID:dblock,项目名称:sncore,代码行数:27,代码来源:AccountEmailsManage.aspx.cs


示例3: _gridRecords_DataBound

    protected void _gridRecords_DataBound(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            AlertData _alert = new AlertData();
            MapDataCommon.GetAlert(ref _alert, Session["trkCompany"].ToString(),
                                 	deviceID, XtremeK.TimeZone.ToServerTime(e.Item.Cells[4].Text).ToString());

            Color item_color = new Color();

            if (_alert.AlertType == "Event") {
                 item_color = ColorTranslator.FromHtml("#FFF26A");
            } else if (_alert.AlertType == "Geofence" || _alert.AlertType == "Red Alert" ||
                       _alert.AlertType == "Speeding") {
                item_color = ColorTranslator.FromHtml("#FF766A");
            } else {
                item_color = ColorTranslator.FromHtml("#61C04E");
            }

            e.Item.BackColor = item_color;

            string html_color = ColorTranslator.ToHtml(item_color);

            e.Item.Attributes.Add("id", e.Item.ItemIndex.ToString());
            e.Item.Attributes.Add("onclick", "highlightRow(this)");

            e.Item.Attributes.Add("onmouseover", "this.style.cursor='pointer';this.style.backgroundColor = '#DCDCDC';");
            e.Item.Attributes.Add("onmouseout", "this.style.cursor='pointer';this.style.backgroundColor = '" + html_color + "';");
        }
    }
开发者ID:guarddoggps,项目名称:xtremek-static,代码行数:30,代码来源:Historical.aspx.cs


示例4: gUserDistills_ItemDataBound

    protected void gUserDistills_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
        {
            double num = _Convert.StrToDouble(e.Item.Cells[1].Text, 0.0);
            e.Item.Cells[1].Text = (num == 0.0) ? "" : num.ToString("N");
            num = _Convert.StrToDouble(e.Item.Cells[2].Text, 0.0);
            e.Item.Cells[2].Text = (num == 0.0) ? "" : num.ToString("N");
            e.Item.Cells[3].Text = "提款";
            switch (e.Item.Cells[4].Text)
            {
                case "0":
                    e.Item.Cells[4].Text = "申请状态";
                    return;

                case "1":
                    e.Item.Cells[4].Text = "已付款";
                    return;

                case "-1":
                    e.Item.Cells[4].Text = "拒绝提款";
                    return;

                case "-2":
                    e.Item.Cells[4].Text = "用户撤销提款";
                    return;
            }
            e.Item.Cells[4].Text = "处理中...";
        }
    }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:30,代码来源:DistillDetail.aspx.cs


示例5: g_ItemDataBound

 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
     {
         TextBox box = (TextBox)e.Item.Cells[2].FindControl("tbSystemEndAheadMinute");
         box.Text = e.Item.Cells[8].Text;
         TextBox box2 = (TextBox)e.Item.Cells[3].FindControl("tbChaseExecuteDeferMinute");
         box2.Text = e.Item.Cells[9].Text;
         if (e.Item.Cells[7].Text.Replace("&nbsp;", "").Trim() == "")
         {
             box2.Visible = false;
         }
         int num = _Convert.StrToInt(e.Item.Cells[6].Text, -1);
         if (num != this.PreLotteryID)
         {
             this.PreLotteryID = num;
             if (this.PreLotteryColor.Name == Color.Linen.Name)
             {
                 this.PreLotteryColor = Color.White;
             }
             else
             {
                 this.PreLotteryColor = Color.Linen;
             }
         }
         e.Item.BackColor = this.PreLotteryColor;
         box.BackColor = this.PreLotteryColor;
         box2.BackColor = this.PreLotteryColor;
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:30,代码来源:LotteryTimeSet.aspx.cs


示例6: dataGrid_OnItemDataBound

 public void dataGrid_OnItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         object dataItem = e.Item.DataItem;
         HyperLink hlItemTitle = (HyperLink)e.Item.FindControl("hlItemTitle");
         if(dataItem.GetType() == typeof(Monks.jkp_Audio))
         {
             Monks.jkp_Audio audioItem = (Monks.jkp_Audio)dataItem;
             hlItemTitle.Text = audioItem.Aud_Title;
             hlItemTitle.NavigateUrl = "Media-ViewAudio.aspx?audioid=" + audioItem.Aud_ID.ToString();
         }
         else if(dataItem.GetType() == typeof(Monks.jkp_Book))
         {
             Monks.jkp_Book bookItem = (Monks.jkp_Book)dataItem;
             hlItemTitle.Text = bookItem.Bk_Title;
             hlItemTitle.NavigateUrl = "Media-ViewBook.aspx?bookid=" + bookItem.Bk_ID.ToString();
         }
         else if(dataItem.GetType() == typeof(Monks.jkp_Video))
         {
             Monks.jkp_Video videoItem = (Monks.jkp_Video)dataItem;
             hlItemTitle.Text = videoItem.Vid_Title;
             hlItemTitle.NavigateUrl = "Media-ViewVideo.aspx?videoid=" + videoItem.Vid_ID.ToString();
         }
     }
 }
开发者ID:vsrz,项目名称:CS498,代码行数:26,代码来源:Media.master.cs


示例7: g_ItemDataBound

 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
     {
         if (e.Item.Cells[7].Text == "0")
         {
             e.Item.Cells[7].Text = "正常登录";
         }
         else if (e.Item.Cells[7].Text == "1")
         {
             e.Item.Cells[7].Text = "<font color='red'>密码错误</font>";
         }
         else if (e.Item.Cells[7].Text == "2")
         {
             e.Item.Cells[7].Text = "<font color='blue'>冻结登录</font>";
         }
         else if (e.Item.Cells[7].Text == "3")
         {
             e.Item.Cells[7].Text = "取回密码";
         }
         else if (e.Item.Cells[7].Text == "4")
         {
             e.Item.Cells[7].Text = "清除日志";
         }
         else
         {
             e.Item.Cells[7].Text = "其它";
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:30,代码来源:LoginLog.aspx.cs


示例8: g_ItemDataBound

 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
     {
         TableCell cell1 = e.Item.Cells[0];
         cell1.Text = cell1.Text + "期";
         e.Item.Cells[1].Text = _Convert.ToHtmlCode(e.Item.Cells[1].Text);
         e.Item.Cells[2].Text = "倍数:" + e.Item.Cells[2].Text;
         double num = _Convert.StrToDouble(e.Item.Cells[3].Text, 0.0);
         e.Item.Cells[3].Text = (num == 0.0) ? "" : num.ToString("N");
         int num2 = _Convert.StrToInt(e.Item.Cells[6].Text, 0);
         long num3 = _Convert.StrToLong(e.Item.Cells[8].Text, -1L);
         if (num2 != 0)
         {
             e.Item.Cells[4].Text = "系统撤单";
         }
         else if (num3 > 0L)
         {
             e.Item.Cells[4].Text = "<font color='#330099'>已成功</font>";
             e.Item.Cells[5].Text = "<a href='../Home/Room/Scheme.aspx?id=" + num3.ToString() + "' target='_blank'><font color=\"#330099\">查看方案</Font></a>";
         }
         else
         {
             e.Item.Cells[4].Text = "<font color='Red'>进行中</font>";
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:27,代码来源:ChaseDetails.aspx.cs


示例9: dgProducts_ItemCreated

	protected void dgProducts_ItemCreated(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Footer)
        {
            PlaceHolder PlaceHolder1 = (PlaceHolder)e.Item.FindControl("PlaceHolder1");

            EasyMenu EasyMenu1 = new EasyMenu();
            EasyMenu1.ID = "EasyMenu1_" + e.Item.ItemIndex.ToString();
            EasyMenu1.ShowEvent = MenuShowEvent.Always;
            EasyMenu1.Position = MenuPosition.Horizontal;
			EasyMenu1.StyleFolder = "styles/horizontal1";
            EasyMenu1.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu1.ID + "_item1", "Buy for...", "", "", "", ""));
			EasyMenu1.AddItem(new OboutInc.EasyMenu_Pro.MenuSeparator(EasyMenu1.ID + "_separator1", "|"));
            EasyMenu1.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu1.ID + "_item2", "Rent for...", "", "", "", ""));
			EasyMenu1.Width = "100%";
			
			EasyMenu EasyMenu2 = new EasyMenu();
			EasyMenu2.ID = "EasyMenu2_" + e.Item.ItemIndex.ToString();
			EasyMenu2.ShowEvent = MenuShowEvent.MouseOver;
			EasyMenu2.Position = MenuPosition.Vertical;
			EasyMenu2.StyleFolder = "styles/horizontal1";
			EasyMenu2.AttachTo = EasyMenu1.ID + "_item1";
			EasyMenu2.Align = MenuAlign.Right;
			switch(e.Item.ItemIndex)
			{
				case 0:
					EasyMenu2.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu2.ID + "_item1", "49.99$ for a piece", "", "", "", ""));
					EasyMenu2.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu2.ID + "_item2", "89.99$ for two pieces", "", "", "", ""));
				break;
				case 1:
					EasyMenu2.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu2.ID + "_item1", "29.99$ for a piece", "", "", "", ""));
					EasyMenu2.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu2.ID + "_item2", "54.99$ for two pieces", "", "", "", ""));
					EasyMenu2.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu2.ID + "_item3", "99.99$ for four pieces", "", "", "", ""));
				break;
			}
			
			EasyMenu EasyMenu3 = new EasyMenu();
			EasyMenu3.ID = "EasyMenu3_" + e.Item.ItemIndex.ToString();
			EasyMenu3.ShowEvent = MenuShowEvent.MouseOver;
			EasyMenu3.Position = MenuPosition.Vertical;
			EasyMenu3.StyleFolder = "styles/horizontal1";
			EasyMenu3.AttachTo = EasyMenu1.ID + "_item2";
			EasyMenu3.Align = MenuAlign.Right;
			switch(e.Item.ItemIndex)
			{
				case 0:
					EasyMenu3.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu3.ID + "_item1", "2.99$ for a day", "", "", "", ""));
					EasyMenu3.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu3.ID + "_item2", "4.99$ for two days", "", "", "", ""));
					EasyMenu3.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu3.ID + "_item3", "9.99$ for a week", "", "", "", ""));
				break;
				case 1:
					EasyMenu3.AddItem(new OboutInc.EasyMenu_Pro.MenuItem(EasyMenu3.ID + "_item1", "Not Available", "", "", "", ""));
					break;
			}

            PlaceHolder1.Controls.Add(EasyMenu1);
			PlaceHolder1.Controls.Add(EasyMenu2);
			PlaceHolder1.Controls.Add(EasyMenu3);
        }
    }
开发者ID:veraveramanolo,项目名称:power-show,代码行数:60,代码来源:cs_easymenu_inside_datagridcolumn.aspx.cs


示例10: dgv_bill_QH_ItemDataBound

 protected void dgv_bill_QH_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     try
     {
         ListItemType it = (ListItemType)e.Item.ItemType;
         if (it == ListItemType.Header ||
             it == ListItemType.Footer ||
             it == ListItemType.Separator)
             return;
         DataRowView dr = (DataRowView)e.Item.DataItem;
         //Cap nhat
         TableCell linkCell = (TableCell)e.Item.Controls[9];
         HyperLink h = (HyperLink)linkCell.Controls[0];
         //   h.NavigateUrl = "statementquerytxn.aspx?tb_Acc=" + TxtAcc_Credit.Text + "&Closing_bal=" + dr["Closing_bal"] + "&due_date=" + dr["due_date"] + "&Min_Due=" + dr["Min_pay"] + "&Open_bal=" + dr["open_bal"] + "&Stmt_date=" + dr["bill_date"] + "&curr_bill=" + dr["Curr_bill"] + "&Last_bill=" + dr["Last_bill"];
         h.NavigateUrl = "Statement_Query_QH_Details.aspx?tb_Acc=" + TxtAcc_Credit.Text + "&NGAY_BILL=" + dr["NGAY_BILL"] + "&DUNO_DAUKY=" + dr["DUNO_DAUKY"] + "&DUTHU_DAUKY=" + dr["DUTHU_DAUKY"] + "&TRANO_DUNO=" + dr["TRANO_DUNO"] + "&TRANO_DUTHU=" + dr["TRANO_DUTHU"] + "&DUNO_CUOIKY=" + dr["DUNO_CUOIKY"] + "&DUTHU_CUOIKY=" + dr["DUTHU_CUOIKY"];
     }
     catch (Exception ex)
     {
         executedb.WriteLogERROR(Session["Username"].ToString(), "IP: " + Request.UserHostAddress, this.Page.ToString(), System.Reflection.MethodBase.GetCurrentMethod().ToString(),ex.Message);
         //executedb.WriteLogPri(Environment.NewLine + DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString() + " - " + Session["Username"].ToString() + ": " + ex.Message);
         //Response.Write("<script>alert('Error in ItemDataBound')</script>");
         //Alert.Show("Error in ItemDataBound", this);
         Session["Error"] = "Error in ItemDataBound!!!";
         Response.Redirect("~/Secure/Error_show.aspx");
     }
 }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:26,代码来源:Statement_Query_QH.aspx.cs


示例11: g_ItemDataBound

    protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
        {
            TableCell cell1 = e.Item.Cells[0];
            cell1.Text = cell1.Text + "期";
            e.Item.Cells[1].Text = _Convert.ToHtmlCode(e.Item.Cells[1].Text);
            e.Item.Cells[2].Text = "倍数:" + e.Item.Cells[2].Text;
            double num = _Convert.StrToDouble(e.Item.Cells[3].Text, 0.0);
            e.Item.Cells[3].Text = (num == 0.0) ? "" : num.ToString("N");
            int num2 = _Convert.StrToInt(e.Item.Cells[7].Text, 0);
            long num3 = _Convert.StrToLong(e.Item.Cells[9].Text, -1L);
            switch (num2)
            {
                case 0:
                    if (num3 > 0L)
                    {
                        e.Item.Cells[4].Text = "<font color='#330099'>已成功</font>";
                        e.Item.Cells[5].Text = "<a href='Scheme.aspx?id=" + num3.ToString() + "' target='_blank'><font color=\"#330099\">查看方案</Font></a>";
                        return;
                    }
                    e.Item.Cells[4].Text = "<font color='Red'>进行中</font>";
                    ((Button)e.Item.Cells[6].FindControl("btnQuashIsuse")).Enabled = true;
                    return;

                case 2:
                    e.Item.Cells[4].Text = "系统撤单";
                    return;

                default:
                    e.Item.Cells[4].Text = "用户撤消";
                    return;
            }
        }
    }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:35,代码来源:ChaseDetail.aspx.cs


示例12: g_ItemDataBound

 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
     {
         e.Item.Cells[1].Text = _Convert.StrToDouble(e.Item.Cells[1].Text, 0.0).ToString("N");
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:7,代码来源:AccountFreezeDetail.aspx.cs


示例13: docGrid_ItemDataBound

 protected void docGrid_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         System.Web.UI.WebControls.LinkButton btnTplImg = (System.Web.UI.WebControls.LinkButton)e.Item.Cells[0].FindControl("btnImgTemplate");
         string docFile = e.Item.Cells[0].Text;
         if (docFile == "&nbsp;" || string.IsNullOrEmpty(docFile))
         {
             btnTplImg.Text = "<div class=\"hd-sp-img hd-sp-img-blank\" ></div>";
             return;
         }
         switch (Path.GetExtension(docFile).ToLower())
         {
             case ".pdf":
             case ".hpd":
             case ".hfd":
                 // form template
                 btnTplImg.Text = "<div class=\"hd-sp-img hd-sp-img-frm\" ></div>";
                 break;
             default:
                 // text template
                 btnTplImg.Text = "<div class=\"hd-sp-img hd-sp-img-txt\" ></div>";
                 break;
         }
     }
 }
开发者ID:W800RDY,项目名称:hotdocs-open-sdk,代码行数:26,代码来源:Disposition.aspx.cs


示例14: g_ItemDataBound

 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) || (e.Item.ItemType == ListItemType.EditItem))
     {
         double num = _Convert.StrToDouble((e.Item.Cells[2].FindControl("lblIn") as Label).Text, 0.0);
         e.Item.Cells[2].Text = (num == 0.0) ? "" : num.ToString("N");
         num = _Convert.StrToDouble((e.Item.Cells[3].FindControl("Label2") as Label).Text, 0.0);
         e.Item.Cells[3].Text = (num == 0.0) ? "" : num.ToString("N");
         num = _Convert.StrToDouble((e.Item.Cells[4].FindControl("Label3") as Label).Text, 0.0);
         e.Item.Cells[4].Text = (num == 0.0) ? "" : num.ToString("N");
         num = _Convert.StrToDouble((e.Item.Cells[5].FindControl("Label4") as Label).Text, 0.0);
         e.Item.Cells[5].Text = (num == 0.0) ? "" : num.ToString("N");
         num = _Convert.StrToDouble((e.Item.Cells[6].FindControl("Label5") as Label).Text, 0.0);
         e.Item.Cells[6].Text = (num == 0.0) ? "" : num.ToString("N");
         num = _Convert.StrToDouble((e.Item.Cells[7].FindControl("Label6") as Label).Text, 0.0);
         e.Item.Cells[7].Text = (num == 0.0) ? "" : num.ToString("N");
         long num2 = _Convert.StrToLong((e.Item.Cells[8].FindControl("Label7") as Label).Text, -1L);
         if (num2 >= 0L)
         {
             (e.Item.Cells[1].FindControl("lblMemo") as Label).Text = "<a href='../Home/Room/Scheme.aspx?id=" + num2.ToString() + "' target='_blank'><font color=\"#330099\">" + (e.Item.Cells[1].FindControl("lblMemo") as Label).Text + "</Font></a>";
         }
     }
     else if (e.Item.ItemType == ListItemType.Footer)
     {
         e.Item.Cells[0].ColumnSpan = 2;
         e.Item.Cells.RemoveAt(8);
         e.Item.Cells[0].Text = "合计";
         e.Item.Cells[1].Text = PF.GetSumByColumn(this.ds.Tables[0], 3, false, 30, this.gPager.PageIndex).ToString("N");
         e.Item.Cells[2].Text = PF.GetSumByColumn(this.ds.Tables[0], 4, false, 30, this.gPager.PageIndex).ToString("N");
         e.Item.Cells[3].Text = PF.GetSumByColumn(this.ds.Tables[0], 5, false, 30, this.gPager.PageIndex).ToString("N");
         e.Item.Cells[5].Text = PF.GetSumByColumn(this.ds.Tables[0], 7, false, 30, this.gPager.PageIndex).ToString("N");
         e.Item.Cells[7].Visible = false;
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:34,代码来源:UserAccountDetail.aspx.cs


示例15: grdEmpl_OnItemDataBound

 public void grdEmpl_OnItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         TotalEngHours += Convert.ToDecimal(Convert.ToDecimal(e.Item.Cells[1].Text));
         TotalFabHours += Convert.ToDecimal(Convert.ToDecimal(e.Item.Cells[2].Text));
         TotalfinHours += Convert.ToDecimal(Convert.ToDecimal(e.Item.Cells[3].Text));
         TotalMiscHours += Convert.ToDecimal(Convert.ToDecimal(e.Item.Cells[4].Text));
         TotalHours += Convert.ToDecimal(Convert.ToDecimal(e.Item.Cells[5].Text));
         TotalPrice += Convert.ToDecimal(Convert.ToDecimal(e.Item.Cells[6].Text));
     }
     else if (e.Item.ItemType == ListItemType.Footer)
     {
         e.Item.Cells[1].Text = TotalEngHours.ToString();
         e.Item.Cells[1].Font.Bold = true;
         e.Item.Cells[1].HorizontalAlign = HorizontalAlign.Left;
         e.Item.Cells[2].Text = TotalFabHours.ToString();
         e.Item.Cells[2].Font.Bold = true;
         e.Item.Cells[2].HorizontalAlign = HorizontalAlign.Left;
         e.Item.Cells[3].Text = TotalfinHours.ToString();
         e.Item.Cells[3].Font.Bold = true;
         e.Item.Cells[3].HorizontalAlign = HorizontalAlign.Left;
         e.Item.Cells[4].Text = TotalMiscHours.ToString();
         e.Item.Cells[4].Font.Bold = true;
         e.Item.Cells[4].HorizontalAlign = HorizontalAlign.Left;
         e.Item.Cells[5].Text = TotalHours.ToString();
         e.Item.Cells[5].Font.Bold = true;
         e.Item.Cells[5].HorizontalAlign = HorizontalAlign.Left;
         e.Item.Cells[6].Text = TotalPrice.ToString();
         e.Item.Cells[6].Font.Bold = true;
         e.Item.Cells[6].HorizontalAlign = HorizontalAlign.Left;
     }
 }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:33,代码来源:Whitfield_Payroll_ByEmployee.ascx.cs


示例16: g_ItemDataBound

 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if ((e.Item.ItemType != ListItemType.Item) && (e.Item.ItemType != ListItemType.AlternatingItem))
     {
         ListItemType itemType = e.Item.ItemType;
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:7,代码来源:UserDistillSuccess.aspx.cs


示例17: billedTransaction_ItemDataBound

    protected void billedTransaction_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        //Billed
        try
        {
            ListItemType it = (ListItemType)e.Item.ItemType;
            if (it == ListItemType.Header ||
                it == ListItemType.Footer ||
                it == ListItemType.Separator)
                return;
            DataRowView dr = (DataRowView)e.Item.DataItem;
            //Cap nhat
            TableCell linkCell = (TableCell)e.Item.Controls[13];
            HyperLink h = (HyperLink)linkCell.Controls[0];
            h.NavigateUrl = "credittransaction.aspx?card=" + dr["card_number_full"].ToString()+"&arn=" + dr["ref_num"].ToString();
            //h.NavigateUrl = "credittransaction.aspx?card=" + dr["card_number_no"] + "&arn=" + dr["ref_num_billed"];
        }

        catch (Exception ex)
        {
            executedb.WriteLogPri(Environment.NewLine + DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString() + " - " + Session["Username"].ToString() + ": " + ex.Message);
            //Response.Write("<script>alert('Error in ItemDataBound')</script>");
            Alert.Show("Error in ItemDataBound", this);
        }
    }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:25,代码来源:transactioncredit.aspx.cs


示例18: dataExportExcel_ItemDataBound

    private void dataExportExcel_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Header)
        {
            //Header Text Format can be done as follows
            e.Item.Font.Bold = true;

            //Adding Filter/Sorting functionality for the Excel
            int cellIndex = 0;
            while (cellIndex < e.Item.Cells.Count)
            {
                e.Item.Cells[cellIndex].Attributes.Add("x:autofilter", "all");
                e.Item.Cells[cellIndex].Width = 200;
                e.Item.Cells[cellIndex].HorizontalAlign = HorizontalAlign.Center;
                cellIndex++;
            }
        }

        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            int cellIndex = 0;
            while (cellIndex < e.Item.Cells.Count)
            {
                //Any Cell specific formatting should be done here
                e.Item.Cells[cellIndex].HorizontalAlign = HorizontalAlign.Left;
                cellIndex++;
            }
        }
    }
开发者ID:EasyDenken,项目名称:GrupoINCI,代码行数:29,代码来源:Inmobiliarias.master.cs


示例19: Datagrid_Itembound

 /// <summary>
 /// DataGrid Item Bound
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Datagrid_Itembound(object sender, DataGridItemEventArgs e)
 {
     InventoryData _inventoryData = (InventoryData)e.Item.DataItem;
     Literal producttypeImage = null;
     producttypeImage = e.Item.FindControl("productImage") as Literal;
     if (_inventoryData != null)
     {
         switch (_inventoryData.EntryType)
         {
             case Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Product:
                 producttypeImage.Text = "<img alt=\"\" src=\""+ m_refContentApi.AppPath+"images/UI/icons/brick.png\" />";
                 break;
             case Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct:
                 producttypeImage.Text = "<img alt=\"\" src=\""+m_refContentApi.AppPath+"images/UI/icons/bricks.png\" />";
                 break;
             case Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Bundle:
                 producttypeImage.Text = "<img alt=\"\" src=\""+m_refContentApi.AppPath+"images/UI/icons/package.png\" />";
                 break;
             case Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Kit:
                 producttypeImage.Text = "<img alt=\"\" src=\""+m_refContentApi.AppPath+"images/UI/icons/box.png\" />";
                 break;
             case Ektron.Cms.Common.EkEnumeration.CatalogEntryType.SubscriptionProduct:
                 producttypeImage.Text = "<img alt=\"\" src=\"" + m_refContentApi.AppPath + "images/UI/icons/bookGreen.png\" />";
                 break;
         }
     }
 }
开发者ID:jaytem,项目名称:minGit,代码行数:32,代码来源:Inventory.aspx.cs


示例20: dgGroupUser_ItemDataBound

 protected void dgGroupUser_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem || e.Item.ItemType==ListItemType.Header)
     {
         e.Item.Cells[0].Visible = false;
     }
 }
开发者ID:Guoyingbin,项目名称:THOK.SortingSystem,代码行数:7,代码来源:GroupUserList.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataGridPageChangedEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# DataGridContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap