Remove unwanted, add new row in grid

If I’m using a Bootstrap Studio grid like an inventory ledger sheet, and the user wants to delete a row, representing a line of inventory, what is the method in code to dynamically accomplish that. Equally, if in the middle of the ledger, the BSS grid, an inventory row needs to be inserted, what is the method in code to dynamically accomplish that.

I’ve googled this to death! Can someone please give me a direction, of some specifics in general JS code? Thx.

Are you talking about doing this dynamically on the website itself or will the client want to do this within BSS? ** If dynamically, someone else will need to help with that**

When you talk about BSS grid, are you talking about a table? I’m assuming so, but want to be sure before rattling off the wrong answer lol.

1 Like

Thank you for responding. No, I was not thinking of a Table in terms or table tags but creating a BSS Grid and then being able to dynamically grow it or shrink it with JS code as driven by the user adding or removing a row of data.

But I slept on it and came up with an easier solution- Just create the max inventory ledger with the number of rows a page will have. With no data the end rows will be blank, visually not present. Then when the user removes a row of inventory data in the middle, just remove that data from the array and redraw the ledger. In that case the bottom row must be cleared as the ledger is one row shorter. The old row of data in the middle of the ledger will not be there, effectively removed.

Maybe I needed to ask for help, so I could step away from it a bit, to finally get it to flow straight in my mind. I really appreciate your popping in! I think I.m good on this now.

hehe gotta love it when that happens! Good luck and hope it all works out as you intend it too. :slight_smile:

1 Like