gridview select不使用选择命令 [英] gridview select without using select command
本文介绍了gridview select不使用选择命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
请紧急
有没有一种方法可以让用户通过单击行中的任意位置(仅一行)来选择一个gridview行.
在这里,我将代码用作
Hi
please urgently
Is there a way to let the user select a gridview row by clicking anywhere in the row(only a single row).
Here i''m use code as
protected void Table_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.aview, "Select$" + e.Row.RowIndex);
e.Row.Style.Add("cursor", "pointer");
}
}
还有其他可能的代码吗?请发送给我
在此先感谢
Is there any other code possible? plz Send Me
Thanks in advance
推荐答案
"+ e.Row.RowIndex); e.Row.Style.Add("cursor","pointer"); } }
" + e.Row.RowIndex); e.Row.Style.Add("cursor", "pointer"); } }
还有其他可能的代码吗?请发送给我
预先感谢
Is there any other code possible? plz Send Me
Thanks in advance
您好,
您可以尝试将GridViews选择模式属性设置为FullRowSelect ...
Hi,
What you can try is set the GridViews Selection-Mode Property to FullRowSelect...
这篇关于gridview select不使用选择命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文