Hi,
I am using jquerydialog.I have a gridview and an edit button in it.I want to call the jquery dialog
on gridview edit buttons click event
and .How can i achieve this?JqueryDialog is working properly on a button click event when is placed outside the gridview
Here the javascript
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script type="text/javascript">
$(function() {
$("#dialog-form").dialog({
autoOpen:false,
show:{
effect:"blind",
duration:1000
},
hide:{
effect:"explode",
duration:1000
},
height:500,
width:550,
modal:true
});
});
$("input[id$=btnAdd]").live("click",function(){
$("#dialog-form").dialog("open");
});
</script>
Heres the gridview i have used
<asp:GridView ID="gdProgram" runat="server" CssClass="ui-widget ui-widget-contain" AutoGenerateColumns="False" Width="700px"
HeaderStyle-CssClass="ui-widget-header">
<Columns>
<asp:TemplateField HeaderText="SlNo">
<ItemTemplate >
<asp:Label ID="Label1" runat="server" Text='<%# "Test1" %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lbl2" runat="server" Text='<%# "Test2" %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lbl3" runat="server" Text='<%# "Test3" %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<input type="button" id="btnEdit" runat="server" value="Edit" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>