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

    And there is one more challenge. That grid contains mandatory columns that must be updated to submit the form and some of them are mandatory by a condition. One thing I can think of is to create a stored procedure which checks that some inputs are missing which returns a value if validation is failed. But I also have to show which page is missing inputs to provide a hint for a user which page to navigate. Any insight on that?

  • 0
    Certified Lead Developer
    in reply to devvados

    Assuming you're OK with sending saved changes (row by row) straight to the database, you should be able to set up queries to check things like rows which have missing required data.  One way would be to construct a query that returns a total count of any rows with missing values for {one or more of a given set of fields}.  Additionally you could allow the user to click an option that would let them filter the list of items down to show only those that still require information to be entered.

Reply
  • 0
    Certified Lead Developer
    in reply to devvados

    Assuming you're OK with sending saved changes (row by row) straight to the database, you should be able to set up queries to check things like rows which have missing required data.  One way would be to construct a query that returns a total count of any rows with missing values for {one or more of a given set of fields}.  Additionally you could allow the user to click an option that would let them filter the list of items down to show only those that still require information to be entered.

Children