Forum Discussion

sarchuleta's avatar
sarchuleta
New Contributor
10 years ago

Anyone have experience using TC to retrieve data from Telerik RadPropertyGrid control?

TC Ver. 11

New to TC and, unfortunately, this particular control is not on the list of supported Telerik controls. Hoping someone might have experience with retrieving data from this control (in particular, data listed within table or grid section) and provide some guidance on accessing that data from TC. Additional control info: http://docs.telerik.com/devtools/wpf/controls/radpropertygrid/getting-started/getting-started

 

We've attempted to use Object Spy to find the grid data, but no luck.

 

 

  • Hi Helen,

        Thanks for your post. I don't believe your post has the exact info needed for the Telerik control I mentioned, but it did inspire me to search for other elements which might apply. As it turns out, the information I was looking for was not within a grid or table element, but within the top-level "items" field. Here's the road map I used:

     

    • Use TC Object Spy to select the Telerik RadPropertyGrid control
    •  Switch from Basic to Advanced View
    • Within Properties tab, select Items (object)  within the .NET section (this is a Telerik.WinControls.UI.PropertyGridItemCollection class object).
    • Select Params button next to Item() field and specify desired index (e.g., 0 for first row, 1 - second row, etc.)
    • Now select the Item object for that index
    • This next screen contains all of the property information I was looking for: e.g., Category text, Label text, etc.
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi sarcheluta,

     

    You can access the item collection of WPF PropertyGrid as:


    propertyGridObj.PropertyDefinitions - unsorted?
    propertyGridObj.WPFObject("ItemsControl", "").Items - sorted alphabetically?

     

    and then access individual items using these properties:


    .Count
    .Item(index).DisplayName.OleValue
    .Item(index).Value - value as an object
    .Item(index).Value.ToString().OleValue - value as a string
    .Item(index).NestedProperties - nested properties, if any

     

    Hope this helps!

    • sarchuleta's avatar
      sarchuleta
      New Contributor

      Hi Helen,

          Thanks for your post. I don't believe your post has the exact info needed for the Telerik control I mentioned, but it did inspire me to search for other elements which might apply. As it turns out, the information I was looking for was not within a grid or table element, but within the top-level "items" field. Here's the road map I used:

       

      • Use TC Object Spy to select the Telerik RadPropertyGrid control
      •  Switch from Basic to Advanced View
      • Within Properties tab, select Items (object)  within the .NET section (this is a Telerik.WinControls.UI.PropertyGridItemCollection class object).
      • Select Params button next to Item() field and specify desired index (e.g., 0 for first row, 1 - second row, etc.)
      • Now select the Item object for that index
      • This next screen contains all of the property information I was looking for: e.g., Category text, Label text, etc.
      • HKosova's avatar
        HKosova
        SmartBear Alumni (Retired)

        Thanks for sharing your solution! I assumed (incorrectly) that you meant the WPF version of the grid, because the link you posted was from Telerik WPF docs. But your grid turns out to be .NET/WinForms.

         

        Anyway, thanks again and good luck with your testing!