Validating a Save on a change event

I am trying to create a save based upon whether any data in the grid has changed when the user goes to exit the application, close or hit on any other events. I did not see any javascript functions that would handle this, if you could please let me know if you have any suggestions on how to capture whether the data has changed within the grid.
Thanks,

Hi,

Thanks for your inquiry.

Well, I think you may use and handle onCellUpdated client side event if it fits your need.

e.g..,

<html>

<body>

............

<script language="javascript">

function onCellUpdated(cell)

{

// your code goes here.

}

</script>

..............

<agw:GridWeb id="GridWeb1" runat="server" OnCellUpdatedClientFunction="onCellUpdated" .......................>

<WebWorksheets>

<agw:Worksheet Name="Sheet1"></agw:Worksheet>

</WebWorksheets>

</agw:GridWeb>

</body>

</html>

Thank you.

Thanks, would you possibly have an example of how to save the grid from within using this client side event, or to even just check if the data has changed with the OnCellUpdate and then have a message reminding the user to save their work.
Thanks,

Hi,

It is simple, here it is.

e.g..,

<html>

<body>

............

<script language="javascript">

function onCellUpdated(cell)

{

window.alert("Data has been changed, please save your work!");

}

</script>

..............

<agw:GridWeb id="GridWeb1" runat="server" OnCellUpdatedClientFunction="onCellUpdated" .......................>

<WebWorksheets>

<agw:Worksheet Name="Sheet1"></agw:Worksheet>

</WebWorksheets>

</agw:GridWeb>

</body>

</html>

Thank you.