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

ClientSide Is Grid in Edit Mode?

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rory
Top achievements
Rank 1
Rory asked on 21 Jan 2011, 09:08 PM
I can use the client side method GridView.get_isItemInserted() to see whether a grid is in Insert Mode but I can't find anything about Edit Mode. I would like to prevent in javascript the user from leaving the page if the user is currently editing or inserting a grid item.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Jan 2011, 06:43 AM
Hello Rory,

The following code shows how to find the whether the grid is in edit mode from client side.

Java Script:
<script type="text/javascript">
    function btnClick() {
        var count = $find("RadGrid1")._editIndexes[0];
        if (count >= 0) {
        // grid is in edit mode
         }
    }
</script>

Thanks,
Princy.
Tags
Grid
Asked by
Rory
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or