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
75
Property grid functionality
posted

Hello all,

I am developing an application's interface with the requirement that I use Infragistics controls throughout. I am using the 2009.2 release.

I have a need to provide an interface for categorized "name-value" data of mixed types and I thought I could use some way to make either WinTree (as shown in a sample) or WinGrid behave like the .NET PropertyGrid control.

What I need is a way to add the "name-value" items on a row basis, with the appropriate editor for its data-type, which are not that many, simple numeric edit, masked edit, check-box and combo-box. I don't need the reflection support provided by some solutions. What I need is an example of a set of these controls working in WinTree, displaying their editors correctly and responding to change events.

An example interface for two mixed data items:

Name         | Value

--------------------------

[-] Category 1

    Number |  1.4

    Boolean | [x]

    List        | value3 [\/]

[-] Category 2

    Number |  2.0

    Boolean | [ ]

    List        | value2 [\/]

 

I have read the various attempts in relevant posts, and tried their suggestions, some of which I could not even get to work. The editors I assigned would not appear for the values...

Can anyone help with a sample with the above editors that actually works ?

Thanks in advance

nickpap

  • 69832
    Suggested Answer
    Offline posted

    nickpap said:
    What I need is a way to add the "name-value" items on a row basis, with the appropriate editor for its data-type, which are not that many, simple numeric edit, masked edit, check-box and combo-box

    This is exactly what the UltraTree PropertyGrid sample demonstrates. While that sample uses reflection (I assume this is the sample you are referring to in that regard), you can very easily pull that code out and populate the cells differently.

    nickpap said:
    The editors I assigned would not appear for the values

    EmbeddableEditorBase exposes a 'CanEditType' method which does what the name implies. If that method returns false for a given type, you can't use that editor. We have editors for all of the native .NET types that you mentioned here, so you should be able to get that working. If you attach a sample of what you have we can try to help you get it working.

  • 4219
    posted

    Hi,

     

    I think this can be achieved via hierarchical datasource organized as follows:

    1.       One main datatable with the categories;

    2.       One sub table for the numbers, one for the Booleans and one for the list (and onther one for the values in the list)

    Please check the attached sample.

    Let me know if you still need any help.

     

    Regards,

    Stefaniya

    WinGridDataOrganization.zip