ASPxComboBox绑定值 并输入联想

 

  <dx:ASPxComboBox ID="txtServices" runat="server" DropDownStyle="DropDown" ClientInstanceName="txtServices"
                            IncrementalFilteringMode="Contains" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                            CssPostfix="DevEx" Spacing="0" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                            ValueType="System.String" Width="90%" ClientIDMode="AutoID">
                            <ClientSideEvents GotFocus="function(s,e){if(txtServices.GetText()=='输入产品型号或关键字'){txtServices.SetText('');}}"
                                LostFocus="function(s,e){if(txtServices.GetText()==null||txtServices.GetText().toString()==''){txtServices.SetText('输入产品型号或关键字')}}"
                                Init="function(s,e){txtServices.SetText('输入产品型号或关键字')}" />
                            <LoadingPanelImage Url="~/App_Themes/DevEx/Editors/Loading.gif">
                            </LoadingPanelImage>
                            <LoadingPanelStyle ImageSpacing="5px">
                            </LoadingPanelStyle>
                            <ButtonStyle Width="13px">
                            </ButtonStyle>
                        </dx:ASPxComboBox>

 

 

 

 <dx:ASPxComboBox ID="ASPxComboBox1" DataSourceID="XpoDataSource21"
                                    ValueField="Oid" TextField="Name" runat="server"  Width="96%"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" Spacing="0"
                                    SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                                    ValueType="System.String" DropDownStyle="DropDown"
                                    IncrementalFilteringMode="Contains">
                                    <LoadingPanelImage Url="~/App_Themes/DevEx/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                </dx:ASPxComboBox>

 

 

   <asp:SqlDataSource ID="XpoDataSource21" ConnectionString="<%$ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT Oid,Name FROM Product ORDER BY Name  "
        runat="server"></asp:SqlDataSource>

 

 

或者
<%--    <dx:XpoDataSource ID="XpoDataSource21" runat="server"
        TypeName="Onkyo.Module.Products.Product">
    </dx:XpoDataSource>--%>

 

或者

 

XPCollection<Product> list = new XPCollection<Product>(s);
        list.Sorting.Add(new SortProperty("Name", DevExpress.Xpo.DB.SortingDirection.Ascending));//排序
        ListEditItem it1 = new ListEditItem("查询产品", "0");

        this.ASPxComboBox6.Items.Add(it1);

 


        this.ASPxComboBox6.SelectedIndex = 0;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值