DevExpress dx:ASPxComboBox客户端多列选中事件用法一例

DevExpress dx:ASPxComboBox客户端多列选中事件用法一例:

<script language="javascript">
//ASPxComboBox 客户端响应事件
//把已选中的值赋给其它文本控件ASPxTextBox的方法
function js_SelectedIndexChanged(s, e) {
            txt_BM.SetValue(s.lastSuccessValue);
        }
</script>
<dx:ASPxGridView ID="dx_gv" ClientInstanceName="dx_gv">
<Templates>
<EditForm>
    <% if (dx_gv.IsNewRowEditing) { %>

    <dx:ASPxComboBox runat="server" ID="txt_LCFMC"   Width="90%" 
        DropDownStyle="DropDownList" IncrementalFilteringMode="Contains" TextFormatString="{0}" AutoPostBack="false"
        DataSourceID="sql_ds_lzfList" TextField="xmName" ValueField="bmCode" 
        ReadOnly="false" ClientInstanceName="txt_LCFMC">
       <Columns>
           <dx:ListBoxColumn FieldName="xmName" Caption="姓名" Width ="45px" />  
           <dx:ListBoxColumn FieldName="ZJHM" Caption="证件号码" Width="140px" /> 
           <dx:ListBoxColumn FieldName="bmCode" Caption="编码" Width="140px" /> 
       </Columns>
       <ClientSideEvents SelectedIndexChanged="js_SelectedIndexChanged"  />
    </dx:ASPxComboBox>

     <% } else{ %>  

    <dx:ASPxTextBox runat="server" ID="txt_LCFMC_2" Text='<%# GetDM(Eval("LCFMC"))%>' Width="90%" 
        ReadOnly="true" ClientInstanceName="txt_LCFMC_2">
    </dx:ASPxTextBox>

    <% }%>

    <dx:ASPxTextBox runat="server" ID="txt_BM" Text='<%# Eval("BM")%>' Width="100%"
        ReadOnly="true" ClientInstanceName="txt_BM">
    </dx:ASPxTextBox>
</EditForm>
</Templates>
</dx:ASPxGridView>  
<asp:SqlDataSource ID="sql_ds_lzfList" runat="server"></asp:SqlDataSource> 


                                                           

展开阅读全文

没有更多推荐了,返回首页