急救:如何判断现在鼠标是点击在datagrid的哪一个cell中?在线 rt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e) { if(e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { //鼠标指针样式 e.Item.Style.Add("CURSOR","hand"); TableCell cell; for(int i=0;i<e.Item.Cells.Count;i++) { cell = e.Item.Cells[i]; int RowID = e.Item.ItemIndex; int ColumnID = i; //鼠标停在单元格上时的样式 cell.Attributes["onmouseover"]="this.style.backgroundColor='#d3d3d3'"; //鼠标离开时的样式 cell.Attributes["onmouseout"]="this.style.backgroundColor='#FFFFFF'"; cell.Attributes["ondblClick"] = "javascript:test('"+((TextBox)e.Item.FindControl("TextBox1")).Text+"')"; } } } dataGrid1.CurrentCell.ColumnNumberdataGrid1.CurrentCell.RowNumber 请教根据生日获取年龄的方法 tfs创建project collectons 我这个递归哪里出错了? insert into 插入失败? DataGrid选择资料和编辑的问题 急需帮忙!运行1年多的网站突然无法登录 DataGrid動態綁定的高級問題解決方法。 有谁能提供几个好的学习asp.net的网站(中文的)? 关于EeekSoft.Web.PopupWin弹出问题 treeview控件使用出现问题,undefined未定义,一○○分 一个较复杂的repeater控件问题 中文提交到服务器为什么就没掉了?
{
if(e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) {
//鼠标指针样式 e.Item.Style.Add("CURSOR","hand"); TableCell cell; for(int i=0;i<e.Item.Cells.Count;i++) {
cell = e.Item.Cells[i]; int RowID = e.Item.ItemIndex; int ColumnID = i; //鼠标停在单元格上时的样式 cell.Attributes["onmouseover"]="this.style.backgroundColor='#d3d3d3'"; //鼠标离开时的样式 cell.Attributes["onmouseout"]="this.style.backgroundColor='#FFFFFF'"; cell.Attributes["ondblClick"] = "javascript:test('"+((TextBox)e.Item.FindControl("TextBox1")).Text+"')";
} }
}
dataGrid1.CurrentCell.RowNumber