Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
calling javascript function not working
posted

Hi

I've a project which is using infragistics 10.3 and the aspx page has a grid. on cell value change I would like to call javascript function which is in sepreate file.

see the code below.

// script manager

<ig:WebScriptManager ID="WebScriptManager1" runat="server">
</ig:WebScriptManager>

// Update cell event.

protected void grdMainSummary_RowUpdating(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e){}

I am using below code to call javascript function from code behind , it work fine when I called it from onload event but not working on "grdMainSummary_RowUpdating" event.

 ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowStatus", "MyFunction();", true);

Regards

Parents
No Data
Reply
  • 22852
    Offline posted

    Hello,

    By default, RowUpdating is an asynchronous event and that would prevent your JavaScript from being executed.  The simplest solution would be to change the AutoPostBack flags so that the event is a full post back rather than an async event though this will have a negative impact on the end user experience and it would be better to use some alternative.  What is it that you are doing in response to the row updating event on the server that you need to change on the client?  Is there a reason that you don't use a client side event of the grid to call your JavaScript?

    It will help to have a more complete picture of what you are doing to suggest the best approach to take.

    Let me know if you have any questions with this matter.

Children