<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
onselectedindexchanged="GridView1_SelectedIndexChanged"
onselectedindexchanging="GridView1_SelectedIndexChanging">
<Columns>
<asp:CommandField HeaderText="Show" SelectText="ShowMessage"
ShowSelectButton="True" />
</Columns>
</asp:GridView>
<div id="content"><div>
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
string html = "";
for (int i = 0; i < GridView1.Rows.Count; i++)
{
html += "<div style='display:none' id='" + i + "'>" + GridView1.Rows[i].Cells[3].Text + "</div>";
GridView1.Rows[i].Cells[0].Attributes.Add("onclick", "$('#" + i + "').dialog()");
}
content.InnerHtml = html;
}
顯示對話框onclick單元格[0]並自動關閉對話框?爲什麼?自動關閉JqueryDialog