Update details upon data retrieval?

Hi all, I hope someone out there can help this relatively simple (i think) question.

I have created a page that has a user entry field with a SearchButton. Upon clicking the search button, I run an event which uses the " wixData.query " to query a data collection and display a table populated with results that match the user-entered search value.

What I want to do, is to then allow the user to click on the row that matches their query, and then update the data within that row.

Can I do this within the same page, or do I need to output the selected row onto another form, which I then re-submit to the dataset? Are there any code demos which show this?

My actual scenario, if it helps, is that this page is for an event. I want to allow a user to enter their name, and find their name from a data set. I then want to allow that user to update whether they can attend the event, and select the type of menu option they want (so essential a few boolean or selection fields), and then save their choices back to the data set.

You can create an onClick event for that row and retrive the data associated with it (make sure to access scope) then open a lightBox and pass on the data for that record, let the user update the data on that record and then save.

An easier approach will be to just set up the index of the dataset to match the item to edit this won’t require much code.