Problem in accessing AcceptAllGridChanges() method using clientaction invokescript in WebGrid

1 reply. Last post: April 14, 2010 10:52 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Gaurav DesaiMember

We are using WebGrid 7 in SharePoint Web Part where we are rendering the grid programatically. 


I am unable to invoke any client script using following command, it simply does not hit the javascriopt at all.


interSoftWebUIGridInstance.ClientAction.InvokeScript( "AcceptGridChanges" );

 

   

As a work around I have tried following command


this.Page.ClientScript.RegisterStartupScript( this.GetType(), "AcceptAllGridChanges", "AcceptAllGridChanges();", true ); 


Following is the javascript function written in my JS File.

function AcceptAllGridChanges()
{    
    var interSoftWebUIGrid = ISGetObject(interSoftWebUIGridClientID); 
    if(interSoftWebUIGrid != null)
    {
        interSoftWebUIGrid.AcceptAllChanges();
    }
    
}

 

Two questions here.

1. Why ClientAction.InvokeScript is not working ?

2. When calling above javascript function using registerstartupscript method, i am getting Operation Aborted error in a javascript popup and the page becomes completely blank. Once i refreshe only after that i get to see data on my screen, what went wrong in calling AcceptAllChanges() from server side ?


 


All times are GMT -5. The time now is 12:25 AM.
Previous Next