Forum Discussion

mjachnowicz's avatar
mjachnowicz
New Contributor
9 years ago
Solved

Obtaining cell values from TcxGrid (Dev Express)

At the beginning, i know, there is exact same suject on SmartBear Support (https://support.smartbear.com/viewarticle/75481/ ) but it's not working.... any of the support pages.

 

So here I'm asking - how can I get in "If...else" statement to one exact cell value from TcxGrid (Developer Express, Delphi)? 

  • Hi,

     

    It depends what the aim is, but you can try this one. Select the record first, obtain the object and try to find  TGridSite.GridView.VisibleItems(ColumnIndex).DataBinding.Field, 'DisplayText'

     

    Kristina

     

4 Replies

  • KristinaA's avatar
    KristinaA
    Occasional Contributor

    Hi,

     

    It depends what the aim is, but you can try this one. Select the record first, obtain the object and try to find  TGridSite.GridView.VisibleItems(ColumnIndex).DataBinding.Field, 'DisplayText'

     

    Kristina

     

    • mjachnowicz's avatar
      mjachnowicz
      New Contributor

      In 'VisibleItems' I can't write parameter, but with VisibleColumns worked. ;-) Thank You!

    • mjachnowicz's avatar
      mjachnowicz
      New Contributor

      Ok, there is one problem...with Your method I get data only from first cell. I can't search for data from other lines from my Grid cells. Can I do that somehow? Get some sort of list or table with all data from one column, ant insert it to "if" statement? 

       

      My problem is - I'm getting one cell from grid, and move it to another. Then, in 'if' statement I must check if the cell was really removed from first grid.

       

      Screen below what do I mean. ;-)

      • KristinaA's avatar
        KristinaA
        Occasional Contributor

        Hi,

         

        You get first row data because it is selected, try to select next row and apply this access and you'll see next row data, but you need to select it. if you use this method.

         

        Regards,

        Kristina