Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Get value when click on the cell of the grid (windowform)

  • Götz Krija

    Member
    October 16, 2023 at 12:09 pm

    Is this a Headed Listbox in a thick-client window? If so, you can probably use the approach mentioned in the technical note: https://www.omnis.net/developers/resources/technotes/tngi0029.jsp

    Something like this should work:

    On evClick
    Calculate hrzPos as (mouseover(kMHorz)-$cobj.$left)+($cobj.$hscroll-1)*8
    Calculate columnWidths as $cobj.$columnwidths
    Repeat
    Calculate colNum as colNum+1
    Calculate colRight as colRight+strtok(‘columnWidths’,”,”)
    Until colRight>hrzPos
    OK message {Value in clicked cell: [iList.[con(‘c’,colNum)]]}

    Götz

  • khanh vu

    Member
    October 17, 2023 at 3:49 am

    thank alot😀

Log in to reply.