Is it possible to remove rows from Paging Grid?? The way we have remove row icon

Certified Senior Developer
Is it possible to remove rows from Paging Grid?? The way we have remove row icon in normal grid??...

OriginalPostID-64446

OriginalPostID-64446

  Discussion posts and replies are publicly visible

  • I think you would have to do it through a process. So on the paging grid allow the user to select multiple rows. Then use the select to either delete or update the rows in the table so the query rule won't pick up the the row. And then loop back to the the paging grid.
  • 0
    Certified Senior Developer
    Joel: I don wanna remove the record from the DB table itself. My scenario s, user gets a list of row based on a search result which is displayed in the paging grid(say grid1). Now he selects multiple entries from the grid1 and the selected rows are fed to another grid (grid2). Now e refresh the search criteria and gets few more results and if he wishes, he need to delete a row from the grid1.
  • Unlike a standard grid, a paging grid pages record. Your requirement conflicts with the user experience of this component. For e.g. If the p.grid shows 5 records by default and there are 3 pages, assume I delete 4 records from page 1 and then turn to page 2, what should the system be showing? 1 or 5 or some other number of records. Now, what happens if the user goes back to page 1. You may want to consider the broader implication of this feature. As recommended, allowing users to select the row and deleting them in the next step is the best recommended approach.
    The other 'not so recommended' alternative is to bring the entire result set into into a CDT structure and use the CDT structure to populate the paging grid. In here, you can write your own logic to delete the corresponding indexes from the CDT and re-populate the paging grid thus not affecting the database table. However, I recommend against this as you will now have to manage a CDT structure in memory and if the volume of data you bring in is huge, it may affect your performance and above all, you lose all the nice things that a query rule offers.
  • 0
    Certified Senior Developer
    Sathya, If i go with the todataset() function to generate the grid for a CDT tye, how can i remove multiple rows at a time?? Can you pls explain.. Cos I selected 2 rows and i got the indexes of both in a multivalued pv!.
    Now If i want to remove the elements from the base array with these 2 indexes, how do i do it??
    If i go with apply() functions, problm with parameter passing and i cnt use expression rules cos thy dont take complext types as inputs.
  • Could you not add a parameter to your query rule as a multiple. Then on the conditions add variable is not in the id's. Then in your process all you have to do is append the id's of the ones you want to 'delete' and therefore the query rule will hide them in the paging grid. Haven't tried it but just a thought
  • 0
    Certified Senior Developer
    Sorry for the prev post. Got the solution.
  • 0
    Certified Senior Developer
    Joel: Hope that works fine.. wil try this approach.. :)