Delete and Edit Row Table connect to DB

Hey,
I’m new to Wix, and i need ur help guys.

So, i have a #table2 connected to the #dataset1 where the data is shown. I’d like to get the following:

1. i’ve got the #button2 that i’d like to delete row from database . Basically, the user has to select the row from the table and then hit the button to delete that row from the dataset and therefore from the table.

2 . edit the select row from the #table2 . The user should select the row from the table, and then hit an Edit button to turn the row editable and then hit the save button.

Pls, can u help me?

1 Like

Hi :slight_smile:

As far as deleting on click, you can connect the table & button to a dataset set to read & write. When they click on the row, it will ‘select’ that item from the dataset. If you set button settings to ‘delete’, it will perform the delete function you are looking for.

For the other … You cannot edit inside of a Table. Using the same method above, you can additionally have user input elements at the top of the table so that when a row is clicked on, the user can edit the information using the user input elements. Then you can have a button to ‘save’ changes.

Wix recently had a webinar showing how to create a client dashboard — but I think they have since removed it from YouTube because I cannot find it. (And I don’t have any tutorial videos showing exactly this.)

Thanks a lot @code-queen !!

Just got the delete button working. pretty easy after u explained it :slight_smile:

For the edit, i think i understood what u meant. Basically, i’ll have to create inputs for each attribute from the table, and when they select the row these inputs will be also filled with the data from the row selected. afterwards they can edit the information and then hit the save button. is that right?

If so, how can i make available the info from the selected row in the input created?

Thanks in advance!

Excellent! Glad it worked for you!

Yes. You add user elements. (Basically building a form) You connect them to the same read & write dataset so that when they click on the row, the element displays the information in that record.

If you need help learning how to create a form go to my YouTube Channel (Code Queen) and look through the playlists. There is one for Basics. The first one or two should be about forms.

could you please paste the code that you writed just here?

@alejandroiriz01

There is no code for this. All she did was connect everything to the dataset settings. To learn the basics on creating a form and using dataset settings, please visit YouTube and search for Wix Code Basics.

Thank you sooooo much @Code Queen Nayeli.

I have been crawling the forums for a solution for like feels forever. You had the best solution and no codes involved, double cheers :tada:. Of course I am now a follower and immediately subscribed to your YouTube Channel.

Hi @code-queen ,

I’m new to Wix and have same functions I want to apply here: deleting data from the table. I have connect a button to dataset but delete function is disabled.

Would you please help me with this issue please?
Thanks