Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with row selection in javatable
#1
Not Solved
--So I'm trying to select a certain row from a javatable.
My code is this--
Code:
Dim numrows
numrows = JavaWindow().JavaTable().JavaInternalFrame().GetROProperty("rows")
numrows = Cint(numrows)
Dim i
i = 0
Dim rowtoselect
rowtoselect = -1
While i<numrows AND rowtoselect = -1
    If Cint(JavaWindow().JavaInternalFrame().JavaTable().GetCellData(i,0)) = Cint(parameter("itemone")) Then
        rowtoselect = i
    End If
        i=i+1
Wend

JavaWindow().JavaInternalFrame().JavaTable().SelectRow rowtoselect

--each time I check with a messagebox and see that the variable "rowtoselect" gives me a integer, and it does me a correct integer, but when I use the command .SelectRow it only selects the first row of my javatable. Another weird thing is when I input some command such as SelectRow "#10" it selects row 10 with no problem, it just won't work when I use my variable as my row number. Can anyone offer any advice as to what may be wrong?--
--as a side note I also checked to see if the parameters were coming through from the previous steps and they were coming through fine--
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Access to JavaCombobox in JavaTable cell? jarkkop 2 3,462 10-17-2018, 09:32 PM
Last Post: riyaz
  Set Value in JavaEdit Inside JavaTable yonobev 9 11,792 11-08-2017, 11:12 PM
Last Post: lotos
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,172 07-10-2017, 04:20 PM
Last Post: rajeevk7
  Working on javatable reddyraam10 0 1,592 02-07-2017, 08:12 AM
Last Post: reddyraam10
  DataGrid: double click on selected row robertosalemi 0 4,288 05-12-2016, 03:00 PM
Last Post: robertosalemi

Forum Jump:


Users browsing this thread: 1 Guest(s)