ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #1 That's right, how to access a tableview index which is needed for use with RemoveAt, anyone?
EnriqueGonzalez Well-Known Member Licensed User Longtime User Dec 26, 2016 #2 The selectedindex in tableview is selectedrow. Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #3 Awesome I will try that. UPDATE: It worked perfectly, thanks. Last edited: Dec 26, 2016 Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #4 btw Enrique what is the equal to selecteditem or text to read an item in the tableview? Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #5 This is how you read what's being selected in a TableView. B4X: Sub TableView_MouseClicked (EventData As MouseEvent) Dim x as int = 1 Textbox1.Text = TableView.SelectedRowValues(x) End Sub where x is the column in the tableview. 0 - ? So in this example the second column. Click to expand... Upvote 0
This is how you read what's being selected in a TableView. B4X: Sub TableView_MouseClicked (EventData As MouseEvent) Dim x as int = 1 Textbox1.Text = TableView.SelectedRowValues(x) End Sub where x is the column in the tableview. 0 - ? So in this example the second column. Click to expand...
EnriqueGonzalez Well-Known Member Licensed User Longtime User Dec 26, 2016 #6 oh i see you answered! good.. if you want any other value aside from the selecteditem (for example another index) B4X: dim r() as string = tableview.items.get(5) textbox1.text = r(0) Upvote 0
oh i see you answered! good.. if you want any other value aside from the selecteditem (for example another index) B4X: dim r() as string = tableview.items.get(5) textbox1.text = r(0)
ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #7 How do you select an item in the tableview from its index (selectedrow) value? When adding a new item to the tableview I use tableview.scrollto(lastitem) and then I want to autoselect it. But how? Upvote 0
How do you select an item in the tableview from its index (selectedrow) value? When adding a new item to the tableview I use tableview.scrollto(lastitem) and then I want to autoselect it. But how?
ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #8 Btw, this is how you change it B4X: Dim row() As Object = TableView.Items.Get(row number) row(5) = "hello Enrique :)" Upvote 0
Btw, this is how you change it B4X: Dim row() As Object = TableView.Items.Get(row number) row(5) = "hello Enrique :)"
ThRuST Well-Known Member Licensed User Longtime User Dec 26, 2016 #9 I solved it myself This is how you autoselect the last added item in a tableview B4X: ' Select the latest added item in a tableview Dim lastitem As Int lastitem = TableView.Items.Size - 1 TableView.ScrollTo(lastitem) TableView.SelectedRow = lastitem You've been ThRuSTed Click to expand... Upvote 0
I solved it myself This is how you autoselect the last added item in a tableview B4X: ' Select the latest added item in a tableview Dim lastitem As Int lastitem = TableView.Items.Size - 1 TableView.ScrollTo(lastitem) TableView.SelectedRow = lastitem You've been ThRuSTed Click to expand...