Forum Discussion

kavansays's avatar
kavansays
Contributor
10 years ago

Javatable GetRows/Get Columns

1) How to get JavaTable RowCount and ColumnCount in testcomplete?

 

My object : "Aliases.javaw.MainWnd.scene.PrimaryTab.TradesTable. ? "

 

2) How to convert that rowcount in string?

  • You can call the native methods of Java objects inside a TC script, so just use .

    table.getRowCount()
    // and
    table.getColumnCount()
  • Thanks for the Reply,

    Firstly it was my mistake not to elaborate the objects, and accordingly i got the reply.

     

    Here the Object type was the JAVAFXOBJECT, where it was not providing normal methods and properties that we normally use.

     

    Solution i found is below:

     

    Set javaw = Aliases.javaw
    Set oTable = javaw.MainWnd.scene.PrimaryTab.TradesTable
    
    iRowCount = oTable.wRowCount

    Cheers !!

    Kavan Shah

  • cunderw's avatar
    cunderw
    Community Hero

    You can call the native methods of Java objects inside a TC script, so just use .

    table.getRowCount()
    // and
    table.getColumnCount()