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>
一个Changed事件给grid里面的GridViewDataComboBoxColumn FieldName="Brand_No" Name="Brand_No"里面绑定的数据进行过滤
我用了TextChanged事件,可以达到数据筛选的效果,但是不能选中,而且grid 里的下拉选择了后,页面刷新了下,新增的行就消失,
TextChanged事件
关键是grid里的下拉怎么联动呢?