Gridview中的按钮在第一次单击时不会触发。
问题描述:
Gridview中的按钮在第一次单击(Gridview RowCommand)时不会触发,但在第二次单击工作时。在这里我使用ajax HoverTooltip,这个控件在GridView之外,但HoverTooltip绑定在网格视图RowDataBound(如果我删除RowDataBound上的代码,用于Ajax HoverTooltip比Perfact工作)我如何解决这个???
Button inside Gridview do not fire on the first click(Gridview RowCommand), but on the second click Work. Here i use ajax HoverTooltip, this control outside of GridView,But HoverTooltip Bind on Grid View RowDataBound(if i remove code on RowDataBound For Ajax HoverTooltip Than Perfact Work) How i Solve This ???
答
至少您可以发布您尝试过的代码,但我想问题可能是您在回发时将数据源绑定到Gridview。
所以编写代码而不是回发。
Atleast you might post the code which you have tried, but i guess the issue may be you bound the datasource to Gridview on postback.
So write the code in not postback.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GridView1.Datasource = DataTable1;
GridView1.DataBind();
}
}
请告诉我们状态,如果没有然后发布你的代码。
Just let us know the status, if not then post your code.