Forum Discussion

Braggart's avatar
Braggart
New Member
4 days ago

Python help

Hello.

I've been trying to get a value from a grid's specific location (row, column) using Python but seems to struggle finding the correct method. So far, the closest method I found is .SelectItem(), but it returns the row's entire value as one long string without white spaces. In javascript, I was easily able to achieve this using the .wItem(row, column) method.

Would appreciate any leads.

  • JDR2500's avatar
    JDR2500
    Frequent Contributor

    Hi,

    Per rraghvani response, the methods often vary from one grid control type to another.  If you are just trying to retrieve a value check the Properties for the grid and see if wValue is an option. As you see below, when supplied with a row and column it will return the current value.

    Another approach I've used is selecting the cell with the ClickCell method and then copying the value to the clipboard with the ^c keyboard shortcut.  Once you have the value on the clipboard you can set a variable equal to it and use that as you wish.  You can also copy a range of cell values with this method by clicking the top left cell with ClickCell and then the bottom right cell by using ClickCell with Shift.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    What properties and methods are shown for your control, when using the Object Spy tool?