Combo default value

  1. #1

    Combo default value

    Hello, I have problem set default value for combo in markup here is my code:

    <ext:ComboBox id="BusinessContractTypeId" runat="server" FieldLabel="Typ" AllowBlank="false" 
                                            ForceSelection="true">
                 <Items>
                        <ext:ListItem Value="0" Text="Type A" Mode="Raw" />
                        <ext:ListItem Value="1" Text="Type B" Mode="Raw" />
                        <ext:ListItem Value="2" Text="Something else" Mode="Raw" />
                 </Items>                                        
    </ext:ComboBox>
    I try without luck: Value="0", RawValue="0" and Text="0"
    first two raise error, text don't do nothing.

    I also try add selecteditems to markup, but then BusinessContractTypeId.SetValue(1) from codebehind don't work

    When I set value from codebehind it works as expected.

    Thanks for help
  2. #2

Similar Threads

  1. Replies: 6
    Last Post: Aug 25, 2011, 2:13 PM
  2. Replies: 3
    Last Post: May 11, 2010, 10:36 AM
  3. Replies: 4
    Last Post: Sep 18, 2009, 9:49 AM
  4. Replies: 1
    Last Post: Aug 11, 2009, 1:28 AM
  5. [OPEN] Default value in a Combo Box
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 15, 2008, 2:42 PM

Tags for this Thread

Posting Permissions