I have a gridview in an update panel and am using a jQuery dialog for adding entries.
The dialog calls an AJAX/JSON function that adds the entry. On success of that function I have jQuery trigger a button click on a hidden button
...
success: function(msg) {
$("[id$='_btnUpdateGrid']").trigger('click');
$("#new_dialog").dialog('close');
},
...
which should hit an event handler in the code behind to update the datasource and refresh the gridview.
<asp:Button ID="btnUpdateGrid" runat="server" OnClick="btnUpdateGrid_Click"
Text=" " Width="1px" Height="1px" Style="background-color:#F5F3E5; border:none;" />
This has worked just fine with 1.3.2. Updated to 1.4.1 and it no longer hits the code-behind. The AJAX still works but I have to manually refresh the page to update the grid.
Also, I can hit client side event handlers (e.g OnClientClick=”alert(‘hello’)”) so I know the click is still happening just not the code-behind event handler. It’s like jquery is somehow blocking the page from doing just that now. I have verified this by just changing the version number in the script reference path and seeing the functionality change.
Is this a bug or s there another way I’m supposed to do this now?
Turns out it was just the order. Not sure why 1.3 didn’t mind the order but that’s all it took.
works fine.