Why can't I add combobox and save boolean value in the propertygrid?

  1. #1

    Why can't I add custom combobox in the propertygrid?

    the property grid doesn't show the listitem text but value(ture,false)
    Click image for larger version. 

Name:	propertygrid.png 
Views:	22 
Size:	8.7 KB 
ID:	5997
    <ext:PropertyGrid ID="PropertyGridModule" runat="server" Width="380" AutoHeight="true">
                                    <Source>
                                      
                                       <ext:PropertyGridParameter Name="是否公开" DisplayName="是否公开" >
                                            <Editor>
                                                <ext:ComboBox ID="cbIsPublic" Visible="true" runat="server" ForceSelection="true"
                                                    Height="200" Editable="false">
                                                    <Items>
                                                        <ext:ListItem Text="公开" Value="Ture" />
                                                        <ext:ListItem Text="不公开" Value="False" />
                                                    </Items>
                                                </ext:ComboBox>
                                            </Editor>
                                        </ext:PropertyGridParameter>
       if (PropertyGridModule.Source["是否公开"].Value == "True")
                    {
                        model.IsPublic = true;
                    }
                    else
                    {
                        model.IsPublic = false;
                    }
    Attached Thumbnails Click image for larger version. 

Name:	propertygrid.png 
Views:	18 
Size:	7.0 KB 
ID:	5996  
    Last edited by hongxue; Apr 11, 2013 at 3:34 AM.
  2. #2
    Hi @hongxue,

    It is a bug in the v2.1 release. It has been fixed and the upcoming v2.2 release will contain this fix.

    Also you will need to remove the ComboBox's Height. It is not required and, moreover, breaks the things.
  3. #3

    thanks for your help

    thanks for your help
    Quote Originally Posted by Daniil View Post
    Hi @hongxue,

    It is a bug in the v2.1 release. It has been fixed and the upcoming v2.2 release will contain this fix.

    Also you will need to remove the ComboBox's Height. It is not required and, moreover, breaks the things.

Similar Threads

  1. how to show combobox in the PropertyGrid?
    By hongxue in forum 2.x Help
    Replies: 17
    Last Post: Jun 07, 2013, 12:38 PM
  2. How to change the Boolean value in combobox?
    By hongxue in forum 2.x Help
    Replies: 0
    Last Post: Apr 10, 2013, 2:15 PM
  3. [CLOSED] PropertyGrid Combobox
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 27, 2011, 6:56 PM
  4. [CLOSED] Combobox in PropertyGrid
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 07, 2011, 4:19 PM
  5. Replies: 0
    Last Post: Jan 19, 2010, 3:37 PM

Tags for this Thread

Posting Permissions