Display a list of string in a single property-grid row vertically

Grids for WPF Forum

Posted 4 years ago by Farouk Bouali
Version: 19.1.0683
Avatar

Hello, 

I am using actipro property-grid, I want to display a list of string in a single property-grid row vertically.

how to do that?

Best Regards.

Comments (4)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Can you provide some more detail on what sort of strings you want to show, and in what kind of user interface (ComboBox, ListBox, etc.)?  Will there be a selection in this list or are you just showing a read-only list?


Actipro Software Support

Posted 4 years ago by Farouk Bouali
Avatar

Hello, thanks for your reply
I am working on something like this no Combobox no Listbox,

----------------------------------------------
>Employees propertygrid                        |
----------------------------------------------
>Names                 |                                  |
----------------------------------------------
[0]                           | name0                      |
[1]                           | name1                      |
[2]                           | name2                      |
[3]                           | name3                      |
[4]                           | name4                      |
[5]                           | name5                      |
----------------------------------------------
>Phone number     |    +9999999999       |
----------------------------------------------

currently, I am using a List<string> and it's working, I want to remove [index] from the right column leave it empty, and the >Names will stay open to view the changes of the list names in a loop.
If you have any other possible solution to my question don't hesitate to tell me, thank you.

Best Regards.

Answer - Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Ok so if I understand correctly, you want to have the name strings showing as an expandable collection and you already have it mostly working. 

The thing is that you'd like the properties to stay expanded, which you could do by setting PropertyGrid.ArePropertiesAutoExpanded to true.  If you wanted to clear out all collection instances from showing the "[index]" in the name column, you could update our index format string resource like this in your app startup:

ActiproSoftware.Products.Grids.SR.SetCustomString(ActiproSoftware.Products.Grids.SRName.UIExpandableCollectionConverterIndexFormat.ToString(), "");


Actipro Software Support

Posted 4 years ago by Farouk Bouali
Avatar

Hello, 

thank you for your answer,

to clear the collection instances from the "[index]", setting the UIExpandableCollectionConverterIndexFormat to empty string will remove all the items. 

I used a space " " instead and that works.

Thank you

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.