My Environment:
QTP v10.0Infragistics TestAdvantage 2007 Volume 1 CLR 2.x Windows Server 2003, 32bit
We have a grid that has one column dedicated to checkboxes. We have the same grid in another area of our product that also has one column dedicated to checkboxes. The problem is, the key for these columns is different so I can't hard code the column key for selection, I need to find the key that contains the checkbox column first. I am doing this by looking at the Style property, because both grids column that is dedicated to checkboxes has the same style value, "CheckBox". I have written code down to the column level before, in fact I am already running code that looks at keys and so forth and that works fine. However when I try to get the Style properties value, I get an error saying it cant find the assembly, I have not seen this before when getting values for other column properties.
All columns contain a Style value of "Default" except for the one that is for checkboxes, and it's Style value is "CheckBox".
Any ideas? Thanks, James.
Code I am executing:
iColumns = oObject.GetNAProperty("DisplayLayout.Bands[0].Columns.Count") sCheckBoxColumnKey = "" For i = 0 to (iColumns - 1) sStyle = oObject.GetNAProperty("DisplayLayout.Bands[0].Columns[" & i & "].Style") '<--- THIS LINE PRODUCES THE ERROR Reporter.ReportEvent micWarning, "style", sStyle If sStyle = "CheckBox" Then sCheckBoxColumnKey = oObject.GetNAProperty("DisplayLayout.Bands[0].Columns[" & i & "].Key") End If Next If sCheckBoxColumnKey = "" Then Reporter.ReportEvent micFail,"Grid_SetCellCheckbox", "Could not find the check box column key." Grid_SetCellCheckbox = FALSE End If
Error it is producing:
Unable to find assembly 'Infragistics2.Win.UltraWinGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'.Function file: [QualityCenter\Resources] Resources\CCS Object FunctionsLine (565): " sStyle = oObject.GetNAProperty("DisplayLayout.Bands[0].Columns[" & i & "].Style")".
Try putting the Infragisics assemblys in the GAC. You will probably need the Win, Grid, and Misc assemblys at a minimum. The GAC is located at c:\windows\assembly. You can drag your dlls there using windows explorer or use the gacutil utilty.
http://aspalliance.com/394_Installing_an_Assembly_in_GAC.5
Thank you Sung, I will give this a try and post my results!