2017-09-01 3 views
0
<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> 

Devexpress ComboBoxのデータバインディングメソッドでインデックス行を取得する方法は?背後にあるコードで

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") 
+1

あなたはおそらく唯一そこで働く人々が何かをする方法を理解することの任意のチャンスを持って、直接DevExpress社のサポートに依頼する必要がありますDevExpressを使用すると...これは苦労するライブラリです。また、あなたの質問はあまりにも明確ではありません – musefan

答えて

0

、このタスクを達成するために、私はあなたがThe general technique of using the Init/Load event handler記事で説明したアプローチを使用し、そのInitイベントハンドラでコンボボックス「DataSourceプロパティを設定示唆しています。

は、私はそれが可能であると考えている:

  1. ASPxComboBox.Initイベントを処理します。
  2. カスタム条件(行の値など)に基づいてASPxComboBox.DataSourceを指定します。

は、これらを参照してください:
ASPxGridView - Bind ASPxComboBox placed in DataItemTemplate
ASPxGridView - How to bind controls placed in the DataItemTemplate with the data field of the grid row
ASPxComboBox on each line/DataItemTemplate of ASPxGridView
ASPxGridView - How to bind ASPxComboBox in the data item template

関連する問題