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
332
JavaScript User Message To Server
posted

Hello,

In our grid (Version 8.2, .NET 3.5) I want to add a window prompt, asking the user his name, in the BeforeRowDeleted-Handler. How can we get the user-input from the client-side to the server-side? On the server-side we want to add the name to a logfile. The grid is AJAX-enabled.


function UltraWebGrid1_BeforeRowDeleted(gridName, rowId)
{
   var inputUser = window.prompt("Enter your name:", "");
   //TODO: Make inputUser available at server-side 
} 

Thanks in advance for your help.

 
 
  • 14049
    Offline posted
    You can try to use custom XmlHttp request mechanism that the grid provides:

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR3.5/html/WebGrid_Object_CSOM.html
    look for description of the invokeXmlHttpRequest method.

    On the server you can get to the data that you pass in inside of the
    XmlHTTPRequest event handler.