DataGrid删除确认及Item颜色交替
来源:互联网 发布:业主数据采集软件 编辑:程序博客网 时间:2024/05/22 14:19
private void dg_ItemDataBound(object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
//删除确认
LinkButton delBttn = (LinkButton) e.Item.Cells[1].Controls[0];
delBttn.Attributes.Add("onclick","javascript:return confirm('确定删除" + e.Item.Cells[4].Text + "?');");
//颜色交替
e.Item.Attributes.Add("onmouseover","this.style.backgroundColor='seashell'");
if(e.Item.ItemType == ListItemType.Item)
{
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#ffffff'");
}
if(e.Item.ItemType ==ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='seashell'");
}
}
}
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- DataGrid删除确认及Item颜色交替
- [NET]DataGrid删除确认 DataGrid_Item颜色交替
- DataGrid颜色交替,删除确认,添加一个从1开始的递增列
- datagrid确认删除
- DATAGRID行与行之间颜色交替
- datagrid删除确认的方法
- 一个datagrid 删除确认例子
- DataGrid删除确认代码以及Gridview删除确认代码
- 留言
- Symbian开发入门
- 爱丁堡大学epcc提供的教学course
- How does an interest-only loan work?
- 学VC遇过的让菜鸟郁闷的事[整理]
- DataGrid删除确认及Item颜色交替
- 一个计算24点的程序
- VC小知识总结(续)
- Why are the letters in the English "alphabet" in the order that they are?
- VC小知识总结
- 明天去订票,准备回家咯~~
- Is the Bible copyrighted?
- 幸福的感觉来的好快
- 你的程序支持 IIS6 - Web Garden 吗?