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
85
SetCellData will not accept TRUE for checkbox value
posted

I have recorded the step for checking a checkbox in a table. It looks like this:

SwfWindow("Analysis Test Application").SwfTable("analysisSetupGridView").SetCellData 0,"Tabulate?",True

However, when playing this back, I get the following error:

SetCellData :Specified cast is not valid..
 Row = 0, Column = Tabulate?, Value = True

I have tried using True, "True", 1, -1, "1" and "-1" and I keep getting an error. Oddly enough, if I try to check a checkbox that is already checked, the statement does not produce an error. Can somebody shed some light on this?

Mike

Parents
  • 7695
    Offline posted

    Hi Mike,

       My thought would be that your Checkbox column may not have a boolean datatype. The way SetCellData works is that it sets the underlying columns value to the value supplied. Sometimes the column can display an editor that would imply a specific data type, such as checkbox is boolean, but actually be something else entirely. To confirm this what I would recommend is to manually set a cells checkstate to checked, then call GetCellData. This should likely give you an idea of what the value needs to be.

     

     

     

Reply Children
No Data