cancel
Showing results for 
Search instead for 
Did you mean: 

grid column width

Highlighted
Contributor

grid column width

hello Community members,

 

good evening,  I am loking for a way to get the grid header column width. I have searched in the test complete help, I found the Itembound but its not working for me.

 

i. Is there a way to get the column header width and also focused row index ?

 

for focused row index I haved tried the FocusedRowIndex property but its not working any ideas please ?

 

Thanks and Regards

SivaKartheek Sreeram

4 REPLIES 4
Highlighted
Community Hero

Re: grid column width

What type of application / grid? What do the object properties look like in the object browser?


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Contributor

Re: grid column width

I am using the TcxGridSite, attached the pic have a look in the properties 

 

thanks and Regards

SivaKartheek

Highlighted
Contributor

Re: grid column width

I was too facing the same problem with TcxGridSite but could not found any to click on the filter, Smart Bear support team asked me to use hardcoded click(x , y) which we get from record scripts.

But I think this way you can click on the specific cell from the Grid and get the row index as well.

 

function ClickGrid(Grid,Column,Value)
{

// GRID param should be the parent object of TCXGRIDSITE

var RowIndex;
function FindRow(Grid, Column, Value, ViewId)
{
if (typeof(ViewId) == "undefined")
ViewId = 0;
for (var i=0; i<Grid.wRowCount(ViewId); i++)
if (Grid.wValue(i, Column, ViewId) == Value)
return i;
return -1;
}
RowIndex = FindRow(Grid,Column,Value);
if (RowIndex != -1)
{
Grid.ClickCell(RowIndex, Column);
Log.Message("Row index: " + RowIndex + " Column Name: " + Value);
}
else
Log.Error("Row was not found");

Highlighted
Contributor

Re: grid column width

hi Anupam,

 

any how thanks for your suggestion, but actually I need the index of the focussed row not by click.

 

thanks and regards

SivaKartheek Sreeram

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!