cancel
Showing results for 
Search instead for 
Did you mean: 

Verify disabled column's in the List View header..

Highlighted
Contributor

Verify disabled column's in the List View header..

Hi,



I am working on a list view and has header with column names "Name", "Company", "ID".

and i could access the each header column value using 

objheader.wItem(i)



When customizing the column headers, if i disable "Name" column then 

my header will have "Company" and 'ID" columns visible on listview screen.



The code objheader.wItem(0) still returning the "Name" even the "Name" column not displayed on listview



How can i check column not displayed on listview?



Thanks

Srikanth Sita





















Thanks
Srikanth Sita
3 REPLIES 3
Highlighted
Community Manager

RE: Verify disabled column's in the List View header..


Hi Srikanth,


 


Try calling TestComplete's Refresh method or the control's special method to update the content of the control:




var listview=//...


listview.Refresh();


var objheader = //...


var col = objheader.wItem(i);




 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Contributor

RE: Verify disabled column's in the List View header..

Hi,



My issue is resolved



By checking the WItemBounds width and height properties.



lvwObject.wItemBounds(0, i).Height = 0 And

lvwObject.wItemBounds(0, i).Width = 0 



(0,i) - 0 as first row is always header and ' i '  is the required column to verify





Thanks

Srikanth Sita
Thanks
Srikanth Sita
Highlighted
Occasional Contributor

RE: Verify disabled column's in the List View header..

That's quite interesting a question to me and it helped me a lot on my ListView header question. I am recently new to C# ListView control, though I have the ListView C# Tutorial, it didn't mention much about the details of the ListView header. This question is of great use and insight.
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors