Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
Unable to find assembly when pulling Style properties value in Grid Column
posted

My Environment:

QTP v10.0
Infragistics 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 Functions
Line (565): " sStyle = oObject.GetNAProperty("DisplayLayout.Bands[0].Columns[" & i & "].Style")".

Parents Reply Children
No Data