Dynamically add and remove items in multiple places in Vue - algorithm

I have a page written in Vue, where there is a table with 3 columns as shown below:
https://i.stack.imgur.com/Ox7gn.png
Each column is a whole entity, and each row are the properties of the entities.
At the bottom of each column, there is a group of buttons for each column.
What I want to do is to append some additional attributes (strings) to possibly more than one properties of an entity when a button is clicked, like below:
https://i.stack.imgur.com/lnUzt.png
And when another button is clicked, more strings are appended.
When a button is clicked again, the corresponding properties will be removed. For example, if the "a" button in the second image was clicked, the table will revert to the first image.
Since there are many properties (around 10), I don't want to hard code all the strings as div's under each and every property and render them conditionally using v-show/v-if.
I have also thought about storing an array of the number of active buttons and re-render the whole table when any button is clicked. (The reason why the whole table has to be re-rendered is because each individual rows are rendered with a for-loop, so I cannot just modify a single element in a row.) But this does not seem very natural, and I believe there should be a better solution.
Is there a good way to do it?

Related

Position a form on a form in vb6

I need to open a second form and position it in a particular location on the first form opened.
Explain: I added a panel to the original form and as I was putting controls on it, I got a message that I could not add any more controls. So...
There is an existing panel that I need to cover up with a second form and have it remain covered even if the original form is dragged about the screen. The second form will cover it, but I need to know how to position it in reference to the first form.
The only references I can find are how to position it on the screen, not another form.
There's certainly no easy way to do that (a form can't host another form). The limit you encountered was the max number of named controls you can have on a form (254, see https://msdn.microsoft.com/en-us/library/aa240865(v=VS.60).aspx).
However, a control array only counts once to that limit. So instead of adding a new control (for instance text boxes) for every input field, add them as new elements of a text box array. The difference in code is that you'll reference the text boxes by index instead of unique name (you can use constants as index parameters to identify the different input fields, such as name, address, etc).

How to render a template column of a grid, in a detailRow?

Here's my situation. I have a main grid, where each row expands to show 2 tabs. The first tab has another grid, with dynamically columns. One of the columns needs to display a template with a modified Kendo Menu (in order for it to look like a dropdown).
When the column is rendered in the main grid, it works just fine. However, when I move that column to the sub-grid, I just see the list, without the kendo menu applied to it.
Two workarounds I tried:
http://dojo.telerik.com/OmiBu/3
Visuals:
Good and Bad

Kendo UI Grid - Columns in GroupHeader

I'm working with a grid that has a lot of boolean data on it's model, so I've got a lot of checkboxes (through a client template) on my grid. At the top of the grid, I have also (in the column's headerTemplate) got checkboxes that basically set/clear all the checkboxes for the same column throughout the grid - and all is just peachy...
However, what I would really like to do is to also have checkboxes in Group Headers (groupings), allowing the user to set/clear all the values for that column within that group.
Whilst I can do this as just a sequence of checkboxes in a group header template, one after the other, it just looks bad. What I really need is to be able to position the checkboxes in the Group Header so as they appear "in line" with the checkboxes from the actual model items.
Any ideas anyone?
Martin.

Adding TextBox in FORM with AddNew Button

I am working in Oracle Apex .i want to add TextBox i-e Disease from AddNew Button because i have Multiple Entries for one TextBox.The entries will be selected from another table through POPUP LOV. Below is the picture.
I don't think I can explain it step by step here, but it sounds like you could make use of a Tabular Form in your case.
In a Tabular form, you can dynamically add-update-delete new rows with a button, and for each field you can have Popop LOVS or Comboboxes to select data from.
Here are a few things to note:
When you insert a Tabular Form in your page, you'll instantly get three processes; one for Automated Row Fetching and two for save-update operations. By default, these processes are triggered through a button. You might want to change that since you have other items to submit in your page.
In a tabular form, you define a SQL query and the resulting columns of that query becomes your fields. For each field, you can select whether you want it to be a Combobox, Popup LOV etc.
Since you want to use a single column "DISEASE" in your treatment table, you can use one of the list item types that support multiple values (generally separated by colons (:)) - for example, a Shuttle.

Slickgrid 2.1 - Apply and Remove Formatters On The Fly (i.e., Depending on Runtime Conditions)

I'm using slickgrid 2.1 and successfully using a formatter for one of my columns in order to display a button that, when clicked, deletes the corresponding row from the grid.
My requirements and question: I need to only display this button in the row the user single-clicks on. When the user clicks one row, then another, the button from the first selected row needs to be hidden and the button on the second selected row needs to be displayed. How can I programmatically do this?
Many thanks.

Resources