首页新闻找找看学习计划

Dev 控件 ASPxComboBox 联动

0
悬赏园豆:30 [已解决问题] 解决于 2017-10-12 14:36

Dev 控件 ASPxComboBox 联动AspxGridView 里的下拉控件 GridViewDataComboBoxColumn 该怎么做?

 1 <dx:ASPxComboBox ID="cbo_Brand_No" CssClass="edit_id" runat="server" ValueField="Brand_No" TextField="Brand_Name" TabIndex="3">
 2 <ClientSideEvents SelectedIndexChanged="function(s, e) { OnBrandsChanged(s); }"></ClientSideEvents>
 3 </dx:ASPxComboBox>
 4 
 5 <dx:ASPxGridView ID="gridDetail" ClientInstanceName="gridDetail" runat="server" KeyFieldName="Id"
 Width="100%" EnableRowsCache="False" AutoGenerateColumns="False">
 7 <Columns>
 8 <dx:GridViewCommandColumn Width="50px" VisibleIndex="0">
 9 <HeaderCaptionTemplate>
10 <dx:ASPxHyperLink ID="lbNew" Text="新增" runat="server">
11 <ClientSideEvents Click="function(s,e){NewRows();}" />
12 </dx:ASPxHyperLink>
13 </HeaderCaptionTemplate>
14 <CustomButtons>
18 <dx:GridViewDataTextColumn FieldName="Id" Name="Id" Width="70" VisibleIndex="2" />

20 <dx:GridViewDataComboBoxColumn FieldName="Brand_No" Name="Brand_No" PropertiesComboBox-ClientInstanceName="grid_cbo_Brand" Width="100" VisibleIndex="4">
21 <PropertiesComboBox ValueType="System.String" TextField="Brand_Name" ValueField="Brand_No" EnableSynchronization="False"
22 IncrementalFilteringMode="StartsWith" DataSourceID="dsBrands" Width="100%">
23 <%--设定客户端回传事件--%>
24 <ClientSideEvents SelectedIndexChanged="function(s, e){gridDetail.PerformCallback('Brand');}" />
25 </PropertiesComboBox>
26 <EditCellStyle HorizontalAlign="Left"></EditCellStyle>
27 </dx:GridViewDataComboBoxColumn>
28 </Columns>

33 <SettingsEditing Mode="Batch" BatchEditSettings-EditMode="Cell" BatchEditSettings-StartEditAction="Click">
34 </dx:ASPxGridView>
View Code

 

 

wqsky的主页 wqsky | 初学一级 | 园豆:119
提问于:2015-08-31 15:01
< >
分享
最佳答案
0

一个Changed事件给grid里面的GridViewDataComboBoxColumn FieldName="Brand_No" Name="Brand_No"里面绑定的数据进行过滤

收获园豆:30
稳稳的河 | 老鸟四级 |园豆:4183 | 2015-08-31 15:59

我用了TextChanged事件,可以达到数据筛选的效果,但是不能选中,而且grid  里的下拉选择了后,页面刷新了下,新增的行就消失,

wqsky | 园豆:119 (初学一级) | 2015-08-31 17:06
其他回答(1)
0

TextChanged事件

✎﹏ℳ๓₯㎕ღ | 园豆:1497 (小虾三级) | 2015-08-31 15:33

关键是grid里的下拉怎么联动呢?

支持(0) 反对(0) wqsky | 园豆:119 (初学一级) | 2015-08-31 15:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册