The attached example illustrates how to populate GridViewDataComboBoxColumn at runtime when ASPxGridView is used in Batch Edit mode.
The technique of completing this task in a batch grid differs from the approach used for a grid in standard mode. When the grid is used in Batch edit mode, ASPxGridView performs all operations on the client side. Therefore, it's not possible to populate the combo box located in each row using the CellEditorInitialize event handler.
As a solution, the combo box can be populated on its callback.
This scenario requires the following steps:
1) Add the combo box' Callback event handler in the grid's CellEditorInitialize event handler.
2) Initiate a callback to the combo box by calling its PerformCallback method in the client-side ASPxClientGridView.BatchEditStartEditing event handler. Pass a row's visible index obtained via e.visibleIndex as a parameter of this method.
3) Add required items to the combo box in its server-side Callback event handler. You can get the current row index from the callback parameter (e.Parameter).
Question Comments
Added By: Cheung Wai Shing at: 7/30/2015 10:41:03 PM
Hi. I have try this sample. It seems got problem when press the new button.
Added By: Larry (DevExpress Support) at: 7/30/2015 11:22:59 PMHello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T273448: T190978 example - Incorerct index is shown when clicking the new button. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.