本文整理汇总了C#中System.Web.UI.WebControls.GridViewRowEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# GridViewRowEventArgs类的具体用法?C# GridViewRowEventArgs怎么用?C# GridViewRowEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridViewRowEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了GridViewRowEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: gvMyProxies_OnRowDataBound
protected void gvMyProxies_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Proxy proxy = (Proxy)e.Row.DataItem;
Literal litName = (Literal)e.Row.FindControl("litName");
Literal litEmail = (Literal)e.Row.FindControl("litEmail");
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
if (proxy.PersonURI != "")
litName.Text = "<a href='" + proxy.PersonURI + "'>" + proxy.Name + "</a>";
else
litName.Text = proxy.Name;
if (proxy.Email != null)
litEmail.Text = "<a href='mailto:" + proxy.Email + "'>" + proxy.Email + "</a>";
else
litEmail.Visible = false;
if (proxy.CanDelete)
{
lnkDelete.CommandArgument = proxy.UserID;
lnkDelete.CommandName = "UserID";
}
else
lnkDelete.Visible = false;
}
}
开发者ID:CTSIatUCSF,项目名称:ProfilesRNS10x-OpenSocial,代码行数:30,代码来源:GetProxies.ascx.cs
示例17: grvList_RowDataBound
protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
//if (Avatar.ImageUrl.ToString().Equals("")) Avatar.ImageUrl = "/Uploads/Core/noimg.jpg";
}
}
开发者ID:gianglv0212,项目名称:VMC,代码行数:7,代码来源:Manage.aspx.cs
示例18: GVUserGroup_RowDataBound
protected void GVUserGroup_RowDataBound(object sender, GridViewRowEventArgs e)
{
if ((e.Row.RowType == DataControlRowType.DataRow) && ((e.Row.RowState == DataControlRowState.Normal) || (e.Row.RowState == DataControlRowState.Alternate)))
{
((LinkButton)e.Row.Cells[5].Controls[0]).Attributes.Add("onclick", "javascript:return confirm('删除该组,将会删除以下内容:\\n1、该组下所有考生\\n2、该组所有考生的考试记录!\\n3、该组所有考生的练习记录!\\n4、该组所有考生的错题记录!\\n\\n\\n你确认要删除组:\"" + e.Row.Cells[1].Text + "\"吗?')");
}
}
开发者ID:rdzzg,项目名称:SHMetroTestSystem,代码行数:7,代码来源:STGroup.aspx.cs
示例19: 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";
if (!Convert.IsDBNull(gvScore.DataKeys[e.Row.RowIndex].Value))
{
int tesid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex].Value);
NurseScoreInfo ds = new NurseScoreInfo(tesid);
if (ds.IsSubmit != 0)
{
Button btnSubmit = e.Row.FindControl("btnSubmit") as Button;
Button btnEdit = e.Row.FindControl("btnEdit") as Button;
Button btnDelete = e.Row.FindControl("btnDelete") as Button;
btnSubmit.Enabled = false;
btnEdit.Enabled = false;
btnDelete.Enabled = false;
}
}
}
}
开发者ID:xingfudaiyan,项目名称:OA,代码行数:26,代码来源:NurseScoregv.aspx.cs
示例20: gvUsers_RowDataBound
protected void gvUsers_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
foreach (TableCell cell in e.Row.Cells)
{
if (cell.HasControls())
{
LinkButton button = (LinkButton)cell.Controls[0];
button.CssClass = "noUnderLine";
if ((button != null) && this.hidSortExpression.Value.Equals(button.CommandArgument))
{
Image child = new Image();
child.ImageUrl = this.hidSortDirection.Value.Equals("ASC") ? "~/Image/up.gif" : "~/Image/down.gif";
cell.Controls.Add(new LiteralControl(" "));
cell.Controls.Add(child);
}
}
}
}
else if (e.Row.RowType == DataControlRowType.Footer)
{
DropDownList listControl = (DropDownList)e.Row.FindControl("ddlNewRoles");
this.oHelper.LoadData(this.dtRoles, listControl);
listControl.DataBind();
}
else if (((e.Row.RowType == DataControlRowType.DataRow) && (e.Row.RowState == DataControlRowState.Edit)) && (e.Row.FindControl("ddlRoles") != null))
{
DropDownList list2 = (DropDownList)e.Row.FindControl("ddlRoles");
this.oHelper.LoadData(this.dtRoles, list2);
list2.DataBind();
string strText = ((DataRowView)e.Row.DataItem).Row.ItemArray[4].ToString();
this.oHelper.SelectedByText(list2, strText);
}
}
开发者ID:wjkong,项目名称:MicNets,代码行数:35,代码来源:UserAdmin.aspx.cs
注:本文中的System.Web.UI.WebControls.GridViewRowEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论