Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Accessing column names
posted

Version  .... CLR 2 2006 vol2

 I can access cell data in the table as in the following code but I'm not sure how to access grab the column names.

For  i  =  1 To  CountColumns
 Col = SwfWindow("CaridianBCT Service Maintenanc").SwfTable("machineHistoryGrid").GetCellData(3, i)

 

Richard

Parents
  • 1040
    Verified Answer
    posted

    If I'm understanding your post correctly, I think you'll need to use GetNAProperty, instead of GetCellData. We were able to use GetNAProperty to drill down into the column headers to pull such properties as the Key, Visible Position, Width, Hidden Status and Tag value, so I'm guessing you could do the same for the Caption. Here's an example of our code:

    SwfWindow("Company").SwfTable("GridName").GetNAProperty("DisplayLayout.Bands[0].Columns[" & i & "].Key")

    Of course, you'll have to use the .Net Windows Forms Spy to determine the Band number (once you've spied on the grid, go to DisplayLayout > Bands and find the number of the Band you need).

    We use TestAdvantage 2006 Volume 2 CLR 1.x, so I'm assuming this could work for you as well.

    Hope this helps!

Reply Children