[CLOSED] Dictionary(of long, string) into a store

  1. #1

    [CLOSED] Dictionary(of long, string) into a store

    I have the following Dictionary created in code behind, this I put into my store for displaying in a combo it shows 3 empty rows in the combo but doesnt show any data and wont allow a row to be selected, any ideas what I've missed?

        Dim x As New Dictionary(Of Long, String)
        x.Add(1, "123XX")
        x.Add(2, "234XX")
        x.Add(3, "345XX")
    
        StoreResolution.DataSource = x
        StoreResolution.DataBind()
    Store and combo:
     <ext:Store ID="StoreResolution" runat="server">
        <Reader>
          
          <ext:JsonReader ReaderID="Key">
            <Fields>
              <ext:RecordField Name="Key" Type="Int" />
              <ext:RecordField Name="Value" Type="String" />
            </Fields>
          </ext:JsonReader>
        </Reader>
        <SortInfo Field="Value" Direction="ASC" />
      </ext:Store>
    
    
    <ext:ComboBox ID="cboOutcome" StoreID="StoreResolution" EmptyText="Select Outcome..."
                          ValueField="Key" DisplayField="Value" FieldLabel="Outcome" Width="280" runat="server">

  2. #2

    RE: [CLOSED] Dictionary(of long, string) into a store

    Hi,

    At this moment the Dictionary is not supported by Store. Please convert that collection to the Generic list. For example
    new List<object> { new { Key = 1, Value = "123XX" } }

Similar Threads

  1. [CLOSED] Loading data in store take too long. browser hangs.
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 21
    Last Post: Nov 22, 2011, 8:42 AM
  2. Replies: 7
    Last Post: Feb 17, 2011, 11:45 AM
  3. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  4. [CLOSED] Possible to DataBind Store to a Dictionary?
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 22, 2010, 9:04 PM
  5. Replies: 3
    Last Post: Nov 12, 2008, 5:16 AM

Posting Permissions