Apr 11, 2013, 2:59 AM
Why can't I add custom combobox in the propertygrid?
the property grid doesn't show the listitem text but value(ture,false)
<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;
}
Last edited by hongxue; Apr 11, 2013 at 3:34 AM.