I need to display 5000 editable rows in the grid

Certified Associate Developer

Hello everyone!

I need to display 5000 rows of editable rows in the grid - it’s about 2mb of data. First thing I have thought of is to fetch data from database with batches - to set a start index and a batch size and pass it to query entity expression, and then provide that result data subset to editable grid with implemented paging option (clicking back and next will trigger an update to a start index as well as a new batch to be fetched from database)

And I’m facing a problem finding an approach to update that data in the database after editing on the form when switching pages. Most probable storing 5k items in a local variable along with other data will cause memory issues while manipulating it for example

Is there any approach to achieve a desired goal?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I strongly recommend against this design approach.  Not only is it very expensive (when even possible) to load this volume of data on-form into local variables, it quickly becomes very cumbersome to manage, do the necessary manual on-form paging operations, etc, and also is very tricky and cumbersome for the user to navigate through all of (and prevent them from accidentally clicking away).  Among other things.

    Instead, show a read-only grid with OOB paging implemented, and give each row a column with an "edit" icon.  When clicked, show that row's editable info in a little section below, and force the user to click "save" or "cancel" before proceeding to do anything else.  When they click "save", promote the updated values directly to the DB.

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Yes, I also thought about that approach to provide a check icon link for example so after editing each row it should be clicked to submit a record to database. I that case I'm able to store only 20 records per batch in the context and not to execute resource consuming operations. That can also be implemented through a master-detail recipe as well. Thank you!

Reply
  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Yes, I also thought about that approach to provide a check icon link for example so after editing each row it should be clicked to submit a record to database. I that case I'm able to store only 20 records per batch in the context and not to execute resource consuming operations. That can also be implemented through a master-detail recipe as well. Thank you!

Children
No Data