Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Efficient way to edit 1000 rows of data in a grid

    Currently I'm using smartclient 12.1p,
    Is there any proper ways to edit 1000 rows of records with the most efficient ways?
    Currently my program will use a loop to assign data into 1000 rows,
    I am trying to make this process faster, is it possible to disable redraw and enable it back after I finished edit those 1000 rows?

    #2
    Hi Ben07

    Update the DataSource and not the ListGrid, in a Queue if the updates are all structurally different or as DSRequest to a special operationBinding with allowMultiUpdate=true.
    For sync in the latter case either set invalidateCache on the clientside DSRequest or directly send the updated data with the server response using DSResponse.addRelatedUpdates().

    Best regards
    ​​​​​​​Blama

    Comment


      #3
      Hi Blama,
      Currently I am using CacheAllData DataSource, and due to we need to use validate row to validate before save, seteditvalue to grid is needed in order to validate row. So when I am looping 1000 rows and edit it programmatically, updateData and seteditvalue is needed to edit a record. And I realised that this kind of process uses 30+seconds to perform edit process. Does it have any other way to solve this?

      Comment


        #4
        As I said, update the DataSource in bulk, not the ListGrid.

        Comment


          #5
          The BatchUploader component is designed for this exact use case.

          Comment


            #6
            I have tried to update Datasource without update grid, when comes to validate row, I have found that validate row malfunction, so means that i should use BatchUploader?

            Comment


              #7
              If you're going to claim a "malfunction", you will need a standalone, ready-to-run test case that has been tested against the latest patched version of SmartClient, and demonstrates a flaw in the SmartClient framework.

              You should be careful to check that your own application code has not simply crashed and that the SmartClient log is not full of warnings (which are expensive to log, and can slow things down) telling you that your code is doing something wrong.

              Note that there's nothing wrong with your use case and the framework supports it. BatchUploader is simply a pre-built component that uses the framework as it is - no internal usage - just doing things the right way. You can replicate it on your own, but, it looks like you're struggling, so just using the pre-built BatchUploader would be the easier path for you.

              If you expect more help, either from Isomorphic or from the community, you should:

              1) read the forum rules, and the Debugging overview in the Reference, to understand how to make it possible to help you

              2) buy a support package if you expect help when you haven't done the basics. We do offer support on an hourly basis, for situations where you haven't figured out if the problem is your code or the framework, and you don't have time to do that, so you'd prefer we figure that out for you

              Comment

              Working...
              X