This is a migrated thread and some comments may be shown as answers.

Item update event is not firing

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Remya
Top achievements
Rank 1
Remya asked on 09 Mar 2012, 11:07 AM
Hi,

I have wrote this in my row click,

function RowClick(sender, eventArgs) {

                if (editedRow ) {

                    hasChanges = false;

                    if (confirm("Update changes?")) {

 

                        $find("<%= RadGrid1.ClientID %>").get_masterTableView().updateItem(editedRow);

                    }

                }

            }

But still my itemupdate event is not firing.

Help me
Thnx in advance

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 13 Mar 2012, 02:31 PM
Remya:

If you have not already done so, you should compare your code against the Grid/Edit on Double-click online demo to determine what is missing.

Your JavaScript function should be wrapped in a RadCodeBlock and should look like this:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
<!--
 var hasChanges,  editedRow;
     
 function RowClick(sender, eventArgs)
 {
     if(editedRow && hasChanges)
     {
            hasChanges = false;
            if(confirm("Update changes?"))
         {
 
             $find("<%= RadGrid1.ClientID %>").get_masterTableView().updateItem(editedRow);
         }
     }
 }
    -->
    </script>
</telerik:RadCodeBlock>

 If you're still not able to get it working, please post your full .aspx markup and applicable code behind.

Cheers!
Tags
Grid
Asked by
Remya
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or