Set the query string value to multibox

  1. #1

    Set the query string value to multibox

    hi ,

    I want to set the multibox value after filling the multibox

    <ext:MultiCombo ID="cmbMedium" AllowBlank="false" BlankText="Select at least one medium"
                                                EmptyText="Select Medium" StoreID="StoreAvdType" ValueField="AdvertTypeName"
                                                DisplayField="AdvertTypeName" FieldLabel="Medium" Width="200" runat="server">
                                                
                                            </ext:MultiCombo>
    
    <ext:Store ID="StoreAvdType" runat="server">
                <Reader>
                    <ext:JsonReader>
                        <Fields>
                            <ext:RecordField Name="AdvertTypeId" />
                            <ext:RecordField Name="AdvertTypeName" />
                        </Fields>
                    </ext:JsonReader>
                </Reader>
            </ext:Store>
    
     StoreAvdType.DataSource = from at in Query.All<AdvertType>()
                                                          select at;
                                StoreAvdType.DataBind();
    
     cmbMedium.SetValueAndFireSelect("TV");
                                cmbMedium.UpdateSelection();
    thanks in advance
    Last edited by geoffrey.mcgill; Aug 25, 2010 at 6:36 PM. Reason: please use [CODE] tags
  2. #2
    Hi Pra,

    this following code is running well for me:

    multiCombo.SelectedItems.Add(new SelectedListItem(selectedValue));
    hope that help for you,
    Huy
    Last edited by geoffrey.mcgill; Aug 25, 2010 at 6:37 PM. Reason: please use [CODE] tags
  3. #3
    Quote Originally Posted by huynd View Post
    Hi Pra,

    this following code is running well for me:

    multiCombo.SelectedItems.Add(new SelectedListItem(selectedValue));

    hope that help for you,
    Huy

    Thanks its works

Similar Threads

  1. query regarding a class
    By svk in forum 1.x Help
    Replies: 0
    Last Post: May 10, 2012, 8:56 AM
  2. Query
    By Shubhangi in forum 1.x Help
    Replies: 1
    Last Post: Nov 03, 2011, 1:53 PM
  3. Replies: 1
    Last Post: Feb 28, 2011, 8:13 AM
  4. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  5. Replies: 3
    Last Post: Nov 12, 2008, 5:16 AM

Tags for this Thread

Posting Permissions