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

Question about implementing batch update for RadGrid?

1 Answer 184 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 25 Feb 2011, 06:59 PM
I am doing an evaluation for our company's 3rd party tool set which is currently Intersoft. One of the biggest features that we use is their BatchUpdate which basically opens allows editing of every column within the Grid. Then, we use a button postback and the Grid has a collection of edited rows that we can use to update only the dirty row's data.

A few questions:

1) I noticed that batch update is possible if the "EditColumn" is hidden. However, the updated data can be lost if: 1) Sort/Filter/Page causing a postback 2) Edit button is clicked changing the row to Edit mode (This can be fixed if the entire grid is loaded in edit mode but #1 issue still exists)

2) Is there a way to tell which Grid.EditedItems are dirty? I noticed this thread (http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-multi-row-questions.aspx) which checks if a row is dirty but it's an iterative process of checking every single row's field before/after update? What about for items to be deleted/inserts? Can all of that be done on the client-side and then handled with one single update? Performing multiple ajax call backs is a performance concern for us.

3) Is there a way to implement #1 with using all of the edit modes: inline, form, and user control? Avoid postbacks until a single batch update?

4) Is there a way to bind the grid using client-side web services using WCF? I noticed a few examples using .NET 2.0 Web Services (ASMX)?

5) Is there a way to implement Google-Like searches in the DropDownList within the Grid's columns?

Thank you for the help.

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 03 Mar 2011, 02:17 PM
Hello Shawn,

To your questions.

1) It is expected that the edited values are not persisted upon postback, implementing logic that would persist these values is a custom approach and is not related to the control's functionality.

2) Another approach that you may prefer to use is demonstrated in the following demo. There onchange handlers are attached to the edited controls which then mark the row as edited. You can try to collect the indexes of the changed rows and pass them as a string argument of the ajaxRequest() method which fires the update, so you will get the indexes of the edited rows on the server.
Edit on Double-click

3) In the demo the grid is not in edit mode, it just has two controls in each cell and their visibility is switched on double-click. Going into edit mode with such approach may not be the best option because then the grid will expect an Update or Cancel command but none will be fired, since you are updating through a manual ajax request. However, template columns offer the freedom to put various controls in them, so different look of the edited rows/cells can be achieved with some custom logic.

4) Here is a link to a blog post that elaborates on binding RadGrid client-side using a WCF service:
How To: Telerik RadGrid for ASP.NET AJAX client-side data-binding to WCF

5) Do you mean google-like search in a combo when the grid is in edit mode? If so, this should not be a problem, the functionality would be achieved by enabling load on demand in the combo box and handling its ItemsRequested event. This is demonstrated in the following Code Library article:
oad On Demand RadComboBox inside an EditItemTemplate of RadGrid

Kind regards,
Tsvetina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or