Forum Discussion

raj5c1's avatar
raj5c1
Occasional Contributor
8 years ago
Solved

How to add custom grid to object maaping list programmatically ?

My application has custom grid where it's base type is System.Windows.Forms.DataGrid . I am unable to access w** properties of the grid. i can add this in Tools ->  current project properties -> Object Mapping. But there are few applications that i have to test which have there own custom grids of the same base type. So it would be easier for me to use the same script if i   map the grid object in script. Or is there any way that i can get convert custom grid to it's base grid type so that i can use it's properties?

  • Select the Derived Classes check box in the Object Mapping. This way you won't have to add each grid class individually - they will be detected automatically.

     

    You can also make this change in Tools > Default Project Properties too, so that it will be automatically added to all new projects you create.

5 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Select the Derived Classes check box in the Object Mapping. This way you won't have to add each grid class individually - they will be detected automatically.

     

    You can also make this change in Tools > Default Project Properties too, so that it will be automatically added to all new projects you create.

    • raj5c1's avatar
      raj5c1
      Occasional Contributor

      can we do this in script?

       

      something like

       

      get_currentProject.setEnable("Derivedclass" ,"Datagrid") 

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        If you do what HKosova said then you only need to do it once.  No need to add it to a script.

    • raj5c1's avatar
      raj5c1
      Occasional Contributor

      Thanks. That's what exactly i wanted