Table with button in each row

4 months ago

MrLlama
Member | 4
+
0
-

Hi guys, could use few tips on how to handle a little problem of mine.
I have a bootstrap-table that has a button in each row.
I would like that on click of the button, it would take the id of the row and change corresponding value in database. Except i am unsure how would be best to handle the ton of buttons with nette.

So far I thought about generating the button with hidden input that would have the row id in itself but not completely sure how exactly that would work.

How would you guys implement this?

4 months ago

chemix
Gold Partner | 1146
+
0
-

Hi @MrLlama can you send a screenshot of your rows.

4 months ago

MrLlama
Member | 4
+
0
-

chemix wrote:

Hi @MrLlama can you send a screenshot of your rows.

Sorry for slow response,
https://imgur.com/a/Aylqj2j
Here you go.

4 months ago

nightfish
Member | 186
+
+1
-

@MrLlama Have a look at Multiplier

4 months ago

MrLlama
Member | 4
+
0
-

@nightfish Perfect answer that really helped me…now for additional question – any idea how to add confirmation modal for each button? (popup window that asks if you are sure)

4 months ago

dkorpar
Backer | 94
+
0
-

@MrLlama maybe you can just use some of existing datagrid components?
https://github.com/…tte/datagrid has all this already implemented and much more

3 months ago

MrLlama
Member | 4
+
0
-

@dkorpar I have tried all kings of nette datagrids. Best one for me would be mesour, but I have been unable to make that one work on nette 3.0, tried learning contributte, and when i finally got it working I found out, that their implementation of treeView is not enough for what i need. I require ability to collapse and expand rows into new tables, not same rows as parent row.