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

RadGrid Not Updating Multiple Rows In Batch Edit/Update Scenario That Loads Data With NeedDataSource

6 Answers 392 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jgill
Top achievements
Rank 1
jgill asked on 27 Jun 2010, 06:03 AM
I am having an issue with a RadGrid that populates it's datasource through the NeedDataSource method/event and allows users to due clients-die batch edits then updates using this sample as a base: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx.

When the data from more than one row in the RadGrid is modified then the batch update image/command is issued, only one row is updated and the changes in other rows are not being refreshed/reflected in the grid like it's remembering the old values and someone not processing more than one row.  I am not sure if it's related to the grid's datasource being set through the code-behind and the grid.

I tried to only include the code that could potentially cause issues, like the Page Load, NeedSource, Update, Client Events, and RadGrid definition.  I have also changed some field values for posting here in case there are any minor typos.

6 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 01 Jul 2010, 08:23 AM
Hi jgill,

Can you please verify that value of editedItemsIds javascript variable is not cleared between the requests?
You may place a breakpoint into RadAjaxManager1_AjaxRequest handler and check if the
UpdateValues method is correctly executed for all of the edited items. Also please try removing the call to the Rebind from the end of the RadAjaxManager1_AjaxRequest handler and see if this makes any difference in the observed behavior.

Best wishes,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
jgill
Top achievements
Rank 1
answered on 03 Jul 2010, 08:22 PM
The updates of all the cells/rows in the database are occurring correctly, but the UI is not getting updated with the values in the grid without the Rebind.  I removed the Rebind for a test, but after the updates are all performed the grid still shows the old values.

I was able to isolate the issue down to the RadComboBox though, if I update multiple cells/values in multiple rows with the Rebind at the end of the AjaxRequest method everything updates correctly in the database and the UI updates...however as soon as one of the edited items is the RadComboBox not all of the item updates are saved to the DB.
0
jgill
Top achievements
Rank 1
answered on 05 Jul 2010, 06:37 AM
Ok, I isolated the issue even more.  Sorry, but in the end the problem was with stored procedure code.  Not any of the other code.  I kept the rebind and everything and just updated the stored procedure.  Thank you.
0
Mark Perry
Top achievements
Rank 1
answered on 15 Feb 2011, 04:19 PM
I was having the same issue. I left the rebind in the updating loop.
0
Vic
Top achievements
Rank 1
answered on 09 May 2013, 06:13 PM
Hi,

I am having the same requirement,Batch updates...but the issue is I have three related  dropdowns.Bases on one dropdown the other dropdown should bind.

Please send me a sample code if you have for the batch updates with related dropdowns in a record.

Will b of gr8 help..

Thanks
0
Antonio Stoilkov
Telerik team
answered on 14 May 2013, 08:43 AM
Hi,

Based on your description it is hard to determine what is the exact scenario you want to achieve. Do you want to use a DropDownList control or a RadComboBox for the relations. In the demo below a relation between RadComboBox controls is shown.

The idea for implementing the desired functionality is to bind the dropdown controls on the server and then on the client when changing a particular value change the other dropdown controls available values for selection. Note that custom scenarios are developer responsibility and should be handled individually.

If you have any additional questions related to RadControls please do not hesitate to contact us again.

Kind regards,
Antonio Stoilkov
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
jgill
Top achievements
Rank 1
Answers by
Rosen
Telerik team
jgill
Top achievements
Rank 1
Mark Perry
Top achievements
Rank 1
Vic
Top achievements
Rank 1
Antonio Stoilkov
Telerik team
Share this question
or