-Arduino Mega2560
-Android Verson 9
-Blynk Server
-Blynk Library version 2.27.19
I like to work with clickable rows in the table. To create the table I use the following code. This code works pretty good.
// Einrichten Tabelle Status Timer Settings
WidgetTable table;
BLYNK_ATTACH_WIDGET(table, V2); //Anlegen table Rolladen Status
//table
void TimerSet() {
for (int p=0; p<12; p++) {
Blynk.virtualWrite(V2, “add”, p, RolladenStatus[p], “hand”);
}
} // end Einrichten table Timer Settings
Now I like to click on the row to change the value. In “Table Settings” “Clickable Rows” is “YES”
But I have no idea how the code must look like. Idea is to check if row ist selected and then change the value in the table. I found this code und Blynk.cc:
BLYNK_WRITE(V1) {
String cmd = param[0].asStr();
if (cmd == "select") {
//row in table was selected.
int rowId = param[1].asInt();
}
if (cmd == "deselect") {
//row in table was deselected.
int rowId = param[1].asInt();
}
if (cmd == "order") {
//rows in table where reodered
int oldRowIndex = param[1].asInt();
int newRowIndex = param[2].asInt();
}
}