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

detail table editing only

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 11 Dec 2008, 02:42 PM
Hello,

I wanted to edit all items in all detail tables. Here is the javascript I used:

             var grid = $find("<%= RadGrid1.ClientID %>"); 
             for (i = 0; i < grid.get_detailTables().length; i++) { 
                var detailTable = grid.get_detailTables()[i]; 
                for (j = 0; j < detailTable.get_dataItems().length; j++) { 
                    detailTable.editItem(detailTable.get_dataItems()[j].get_element()); 
                } 
             } 

To my surprise, only the last item in the last details table entered the edit mode and I can't understand why. I have set both AllowMultiRowEdit="true" and AllowMultiRowSelection="true" I have also looked over the 'Going into edit mode with AJAX double-click', but I see a problem there in finding the ID of the detaile table, or at least it's index in the detailesTable array, because the mentioned article only shows how to edit with double click a master table view.
I am also looking for a way to perform a batch update on all of these detail tables. Will EditItems property of the RadGrid hold all currently editable items, even if they are from the detaile tables?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 15 Dec 2008, 03:14 PM
Hello Alex,

This is indeed a strange issue and unfortunately I cannot say for certain what might be the exact reason for the erroneous behavior you observed. Does using the editAllItems() client method makes a difference? If the problem persists, please prepare a small working version of your project, demonstrating the oddity, and send it attached to a regular support ticket. We will familiarize with your complete code logic and will get around to you with our findings.

The EditItems server-side collection of RadGrid holds the items in edit mode from all tables in its hierarchy (or only from the master table if having a flat grid).

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or