Forum Discussion

dineshreddy_512's avatar
dineshreddy_512
New Contributor
12 years ago
Solved

how to check if a column is visible on a grid

I make a datagridcolumn invisible on certain conditions. How can I check if a column of a grid control is visible or not in Test complete script ?
  • Hello Jay,

    Thanks for the reply. I got it working and I did use the native properties of the control. Just in case if someone needs an answer, here it is 



    WinFormsObject("gridControl").MainView.Columns.ColumnByName("gridColumnName").visible

3 Replies

  • Hello Jay,

    Thanks for the reply. I got it working and I did use the native properties of the control. Just in case if someone needs an answer, here it is 



    WinFormsObject("gridControl").MainView.Columns.ColumnByName("gridColumnName").visible
    • Darshana's avatar
      Darshana
      Occasional Contributor

      I am not able to get the property columnbyname.

       

      Can you please guide me how can I access this native property?

       

      I am using Testcomplete 11 and I am using TDBGrid.

       

      Thanks

      Darshana

  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Dinesh,


    I guess that you need to use the control's native properties and methods to do this. Which grid control are you testing (name and version)?