In continuation of my earlier project--- I have three panels and in one of panel I have one gridview with binding to datatable fields. Gridview is being displayed on click of a button in popup window using Java script. I like to use same popup window and gridview on click of the two buttons but with different set of datatable fields. I could not succeeded in binding different sets of datatable fields according to the button pressed and displaying in gridview I am also having show and hide option of button on mouse over on TextBox8, but not working. If posible please suggest rectification and necessary coding. Thanking you in advance
<script type="text/javascript">
$(function () {
$("[id*=TextBox8] td").bind("mouseover", function () {
$(this).closest("tr").find("[id*=btn1]").show();
});
$("[id*=TextBox8] td").bind("mouseout", function () {
$(this).closest("tr").find("[id*=btn1]").hide();
});
});
$(function () {
$("[id*=btn1]").click(function () {
ShowPopup1();
return false;
});
});
$(function () {
$("[id*=btn2]").click(function () {
ShowPopup2();
return false;
});
});
function ShowPopup1() {
$("#dialog").dialog({
title: "btn1 details",
width: 450,
buttons: {
Ok: function () {
$(this).dialog('close');
}
},
modal: true
});
}
function ShowPopup2() {
$("#dialog").dialog({
title: "btn2 details",
width: 450,
buttons: {
Ok: function () {
$(this).dialog('close');
}
},
modal: true
});
}
</script>
<div id="dialog" style="display: none">
<asp:GridView ID="gvdetails1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="column1" HeaderText="column 1 details" ItemStyle-Width="80" />
<asp:BoundField DataField="column2" HeaderText="column 1 qty" ItemStyle-Width="25" />
</Columns>
</asp:GridView>
</div>
--------buttons-------
<asp:Button ID="btn1" runat="server" Text="more" ForeColor="#9999FF" Font-Underline="True"
BorderStyle="None" />
<asp:Button ID="btn2" runat="server" Text="more" ForeColor="#9999FF" Font-Underline="True"
BorderStyle="None" />
protected void BindgvpendPR()
{
gvdetails1.DataSource = (DataTable)ViewState["dt"];
gvdetails1.DataBind();
}