Deleting trimmed rows

Tags: #<Tag:0x00007efc719e74c8>

Hi,

I have a table and rows in it, and they can have child-parent relations with each other based on a column value. And I am hiding (by trimming them) these children by clicking custom rendered -/+ icons at parent row’s specific column.

Let’s say, I want to delete row index 5, and this row has 2 children rows which are trimmed. I need to delete those two rows as well.

I am having 2 difficulties about it.

  1. I can’t delete trimmed rows. How can I do that?
  2. When I press undo (ctrl+z) the table is going crazy. How can I solve that?

Best wishes,
Y.

Hi @yusuf

you’d need a custom mechanism that tracks how many children does a 1-lvl child has. Then if you delete children first and then the parent undoRendo should understand what happened and give you a right order of rows.

Hi @aleksandra_budnik,

Sorry for late reply. There is only one question left. How can I delete a trimmed row? It doesn’t matter neither it is a parent nor a child.

Hi,

Deleting rows work on visual indexes. You don’t have an access to trimmed rows, so you have to untrim the row first, and then delete it.

Kind regards,
Wojciech