I added a link button in a templateField into my wdg with a cssClass 'delete'.
I capture the click event of those linkbuttons in jqurey like so:
$('.delete').click(function () {
} );
in that function I ask the user to confirm the delete.
This works fine, except when anything is done to the webdatagrid that causes a partial postback. Like filtering, changing page, sorting ...
In general when using update panels I wrap my jQuery code in pageLoad function and that seems to rebind the jquery events. But it does NOT help for webdatagrid.
What can I do to make sure that jquery works throughout wdg partial postbacks?
Thanks in advance
Hello boruchsiper,
Thank you for posting on our forum.
Set the binding of the event in the grid’s client side Initialize event. In that way since this event will fire after every partial postback that the grid does the event will get re-binded.
For example:
function WebDataGrid1_Grid_Initialize(sender, eventArgs)
{
///<param name="sender" type="Infragistics.Web.UI.ControlMain"></param>
///<param name="eventArgs" type="Infragistics.Web.UI.EventArgs"></param>
...
});
}
Let me know if you have any further questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support