M MroBurk Member Licensed User Jan 29, 2022 #1 Hi I created the db with a customlistview, I need Help because the Customlistview_clickItem doesn't work... It seems that it cannot take the value of the list. Can you Help me? When the Item is clicked, it opens the next activity with the last row, not by the clicked... thanks!! Attachments DB.zip DB.zip 14 KB · Views: 260
Hi I created the db with a customlistview, I need Help because the Customlistview_clickItem doesn't work... It seems that it cannot take the value of the list. Can you Help me? When the Item is clicked, it opens the next activity with the last row, not by the clicked... thanks!!
LucaMs Expert Licensed User Longtime User Jan 29, 2022 #2 To find the bug you should have logged Value. You have not associated a value to the items of the CLV. Listen to a newbie: get started right away with B4XPages projects, rather than "pure" B4A. Attachments DBlm.zip DBlm.zip 14.1 KB · Views: 247 Upvote 0
To find the bug you should have logged Value. You have not associated a value to the items of the CLV. Listen to a newbie: get started right away with B4XPages projects, rather than "pure" B4A.
mangojack Expert Licensed User Longtime User Jan 29, 2022 #3 To begin with ... You have not passed a Value when adding to the CLV... Code: CustomListView1.Add(p, "") Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery("SELECT * FROM Table1 WHERE Name ='" & Value & "'") Make the following changes ... Code: CustomListView1.Add(p, NOME) Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery2("SELECT * FROM Table1 WHERE Name = ? ", Array As String(Value)) Upvote 0
To begin with ... You have not passed a Value when adding to the CLV... Code: CustomListView1.Add(p, "") Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery("SELECT * FROM Table1 WHERE Name ='" & Value & "'") Make the following changes ... Code: CustomListView1.Add(p, NOME) Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery2("SELECT * FROM Table1 WHERE Name = ? ", Array As String(Value))
LucaMs Expert Licensed User Longtime User Jan 29, 2022 #4 mangojack said: To begin with ... You have not passed a Value when adding to the CLV... Code: CustomListView1.Add(p, "") Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery("SELECT * FROM Table1 WHERE Name ='" & Value & "'") Make the following changes ... Code: CustomListView1.Add(p, NOME) Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery2("SELECT * FROM Table1 WHERE Name = ? ", Array As String(Value)) Click to expand... That is: do what @LucaMs did in the project he attached Upvote 0
mangojack said: To begin with ... You have not passed a Value when adding to the CLV... Code: CustomListView1.Add(p, "") Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery("SELECT * FROM Table1 WHERE Name ='" & Value & "'") Make the following changes ... Code: CustomListView1.Add(p, NOME) Code: Private Sub CustomListView1_ItemClick (Index As Int, Value As Object) Status = "U" rs= Starter.sql.ExecQuery2("SELECT * FROM Table1 WHERE Name = ? ", Array As String(Value)) Click to expand... That is: do what @LucaMs did in the project he attached
mangojack Expert Licensed User Longtime User Jan 29, 2022 #5 LucaMs said: That is: do what @LucaMs did in the project he attached Click to expand... sorry ... unaware you had already posted a solution. Upvote 0
LucaMs said: That is: do what @LucaMs did in the project he attached Click to expand... sorry ... unaware you had already posted a solution.