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

Equivalent of get_editItems() in older versions of Telerik RadGrid

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 05 Feb 2014, 07:22 PM
Good Afternoon All,

I am using an older version of Telerik (v 2011.1.519.35) and my company unfortunately is not going to upgrade to the new version so I am stuck with what I got. Anyway that being said I need to a collection of items that are in the 'edit' state to return to a jQuery function that is keeping track of all of that information.

If I can't use this method what are some equivalent ideas / approaches that I can use to get this information.

TIA,
Bill

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 10 Feb 2014, 01:02 PM
Hello Bill,

With the version you are using you could use the private _editIndexes collection of the grid's client-side API to retrieve the indexes of all items that are currently in edit mode.

Bellow is a simple example that demonstrates how to retrieve the data items currently in edit mode:
<telerik:radcodeblock runat="server">
    <script type="text/javascript">
        function getEditItems() {
            var grid = $find("<%=RadGrid1.ClientID%>");
            var master = grid.get_masterTableView();
            var dataItems = master.get_dataItems();
            for (var i = 0; i < grid._editIndexes.length; i++) {
                var editedItem = dataItems[grid._editIndexes[i]];
            }
        }
    </script>
</telerik:radcodeblock>

Hope that helps.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Bill
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or