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

7 posts, 0 answers
  1. jgill
    jgill avatar
    116 posts
    Member since:
    Jul 2005

    Posted 27 Jun 2010 Link to this post

    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.
  2. Rosen
    Rosen avatar
    3215 posts

    Posted 01 Jul 2010 Link to this post

    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,
    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
  3. DevCraft R3 2016 release webinar banner
  4. jgill
    jgill avatar
    116 posts
    Member since:
    Jul 2005

    Posted 03 Jul 2010 Link to this post

    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.
  5. jgill
    jgill avatar
    116 posts
    Member since:
    Jul 2005

    Posted 05 Jul 2010 Link to this post

    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.
  6. Mark Perry
    Mark Perry avatar
    17 posts
    Member since:
    Mar 2010

    Posted 15 Feb 2011 Link to this post

    I was having the same issue. I left the rebind in the updating loop.
  7. Vic
    Vic avatar
    1 posts
    Member since:
    Feb 2013

    Posted 09 May 2013 Link to this post


    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..

  8. Antonio Stoilkov
    Antonio Stoilkov avatar
    530 posts

    Posted 14 May 2013 Link to this post


    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.
Back to Top
DevCraft R3 2016 release webinar banner