[CLOSED] Multicombo value set by the database

  1. #1

    [CLOSED] Multicombo value set by the database

    Hello All

    I have tried using multicombo and set values via the database, already tried several codes and could not.

    Aspx file
                                                <ext:MultiCombo
                                                    runat="server"
                                                    Width="640"
                                                    ID="cmbProcuracao"
                                                    Editable="false"
                                                    DisplayField="RazaoSocial"
                                                    Delimiter=","
                                                    ValueField="Id"
                                                    QueryMode="Remote"
                                                    ForceSelection="true"
                                                    TriggerAction="All"
                                                    StoreID="strProcuracao"
                                                    AllowBlank="true"
                                                    EmptyText="Selecione...">
                                                    <Listeners>
                                                        <Expand Handler="this.getStore().reload();" />
                                                    </Listeners>
                                                </ext:MultiCombo>
    In Code Behind

    
                   cmbProcuracao.SelectedItems.Add(new Ext.Net.ListItem("13"));
                   cmbProcuracao.SelectedItems.Add(new Ext.Net.ListItem("2"));
    And Not Set Value in multicombo

    I tried also
                    Ext.Net.ListItem list = new Ext.Net.ListItem();
                    list.Value = "2,13,15";
                    cmbProcuracao.SelectedItems.Add(list);
    I thank those who could help me

    Ulisses
    Last edited by Daniil; Apr 30, 2015 at 3:44 PM. Reason: [CLOSED]
  2. #2
    Hello


    I found the problem, put the code below and it worked.

                    cmbProcuracao.SelectedItems.Add(new Ext.Net.ListItem() { Value = "13" });
                    cmbProcuracao.SelectedItems.Add(new Ext.Net.ListItem() { Value = "2" });
                    cmbProcuracao.SelectedItems.Add(new Ext.Net.ListItem() { Value = "15" });
                    this.cmbProcuracao.UpdateSelectedItems();


    You can close the Post

Similar Threads

  1. CellSelection and database
    By bolzi89 in forum 1.x Help
    Replies: 36
    Last Post: Dec 22, 2011, 8:23 AM
  2. DataBase Connectivity
    By archana in forum 1.x Help
    Replies: 1
    Last Post: Sep 19, 2011, 12:55 PM
  3. Replies: 5
    Last Post: Jul 30, 2011, 6:40 PM
  4. how to add date and and tme it the database
    By harshad.jadhav in forum 1.x Help
    Replies: 2
    Last Post: Dec 22, 2010, 10:37 PM
  5. Save in database
    By flaviodamaia in forum 1.x Help
    Replies: 4
    Last Post: Nov 06, 2008, 7:16 AM

Posting Permissions