[英]Devexpress how get index row in ComboBox DataBinding method?
<dx:GridViewDataComboBoxColumn Caption="<%$Resources: zione%>" Width="15%" Visible="true">
<DataItemTemplate>
<dx:ASPxComboBox ID="comboZione"
runat="server"
ValueField="TIPB_CTBZIONE"
TextField="DEFI_CTBZIONE"
OnDataBinding="comboZione_OnDataBinding"
EnableCallbackMode="false"
OnSelectedIndexChanged="combo_OnSelectedIndexChanged">
</dx:ASPxComboBox>
</DataItemTemplate>
</dx:GridViewDataComboBoxColumn>
在后面的代碼中:
protected void comboZione_OnDataBinding(object sender, EventArgs e)
{
ASPxComboBox cmb = (sender as ASPxComboBox);
cmb.DataSource = ddlLoadZione(IndexRow);
// Here I want to bind the different combox on which row,
// but I needed a index row to do this.
}
索引行需要我獲取該行的正確值。
Grid.GetRowValues(**IndexRow**, "FieldName")
要完成此任務,建議您使用“ 使用Init / Load事件處理程序的一般技術”一文中介紹的方法,並在其Init事件處理程序中設置組合框的DataSource屬性。
我相信有可能:
請參考以下內容:
ASPxGridView-綁定放置在DataItemTemplate中的ASPxComboBox
ASPxGridView-如何將放置在DataItemTemplate中的控件與網格行的數據字段綁定
每行ASPxComboBox / ASPxGridView的DataItemTemplate
ASPxGridView-如何在數據項模板中綁定ASPxComboBox
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.