Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
107
Filter in combobox
posted

I am trying to use the combobox in the asp.net, here is my aspx page:

<igcmbo:WebCombo ID="cbCountry" runat="server" BorderColor="LightGray" DropImage1="/ig_common/images/ig_cmboDownXP1.bmp"

DropImage2="/ig_common/images/ig_cmboDownXP2.bmp" Editable="True" SelBackColor="49, 106, 197"

Version="3.00" Font-Names="Arial" Font-Size="9pt" DataTextField="Countryname" DataValueField="CountryCode" ComboTypeAhead=Suggest>

<ExpandEffects ShadowColor="LightGray" />

<DropDownLayout BorderCollapse="Separate" RowHeightDefault="20px" Version="3.00">

</DropDownLayout>

<Columns>

<igtbl:UltraGridColumn BaseColumnName="Country_name" HeaderText="Countryname" Key="Countryname">

<header caption="Country_name"></header></igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="Countrycode" DataType="System.UInt32" Hidden="True" Key="Countrycode">

<header>

<RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>

</header>

 

<footer>

<RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>

</footer>

</igtbl:UltraGridColumn>

</Columns>

</igcmbo:WebCombo>

For example verytime I type an "A" in the box, the whole list of country name is display, but it does not filter any countries, which start with an "A", only an image circle keep going, it is try to filter it.

I am not sure what I need to do.

 

 

  • 107
    posted

    If I am using this

    <asp:SqlDataSource ID=sqldatasource runat=server ConnectionString="<%$ ConnectionStrings:MYCNN %>" ProviderName="<%$ ConnectionStrings:MYCNN.ProviderName %>" SelectCommand="SELECT * FROM country_list" SelectCommandType=Text>

    </asp:SqlDataSource>

    then the filter is working fine, but I try to bind it from the codebehind, then the filter does not work

    private void cbCountry_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)

    {

    e.Layout.ViewType = Infragistics.WebUI.UltraWebGrid.
    ViewType.Flat;

    e.Layout.Grid.Width = 250;

    e.Layout.Bands[0].Columns[0].Hidden =
    true;e.Layout.Bands[0].Columns[1].Header.Caption = "Country Name";

     

    }

     

    private void cbCountry_InitializeDataSource(object sender, Infragistics.WebUI.WebCombo.WebComboEventArgs e)

    {

    DataSet objds;

    objds = new DataSet();

    using (objConn = new OracleConnection(cnn))

    {

    objConn.Open();

    objCmd =
    new OracleCommand();

    objCmd.Connection = objConn;

    objCmd.CommandText =
    "Prostate_API.country_list";

    objCmd.CommandType = text;

    objCmd.Parameters.Add(new OracleParameter("country_list_cursor", OracleType.Cursor)).Direction = ParameterDirection.ReturnValue;

    try

    {

    myDA =
    new OracleDataAdapter();

    myDA.SelectCommand = objCmd;

    objds =
    new DataSet();

    myDA.Fill(objds);

    myDA.Dispose();

    myDA =
    null;

    objConn.Close();

    objConn.Dispose();

    }

    catch (Exception ex)

    {

    throw new Exception(ex.ToString());

    }

    }

    cbCountry.DataSource = objds;

    cbCountry.DataTextField =
    "Country_name";cbCountry.DataValueField = "Country_code";

    }

     

    on the page_onload

    this.cbCountry.InitializeDataSource += new Infragistics.WebUI.WebCombo.InitializeDataSourceEventHandler(this.cbCountry_InitializeDataSource);

    this.cbCountry.InitializeLayout += new Infragistics.WebUI.WebCombo.InitializeLayoutEventHandler(this.cbCountry_InitializeLayout);

    this.cbCountry.Editable = true;

    this.cbCountry.EnableXmlHTTP = true;

    this.cbCountry.ComboTypeAhead = Infragistics.WebUI.WebCombo.TypeAhead.Suggest;

    this.cbCountry.DropDownLayout.RowsRange = 15;

     

    but nothing happen

     

    Please help