This is a migrated thread and some comments may be shown as answers.

Programmatically added OnSelectedIndexChanged to gridDropDownBound dropdownlist is not fired

1 Answer 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hk
Top achievements
Rank 2
Hk asked on 15 Jan 2009, 04:26 PM
I have a gridDropDownBound column:
<telerik:GridDropDownColumn DataField="iCaptureType" HeaderText="iCaptureType" SortExpression="iCaptureType" 
                UniqueName="iCaptureType" DataType="System.Int32" DropDownControlType="DropDownList"
            </telerik:GridDropDownColumn> 

When enter to edit mode, I add it selectedindexchanged event:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
        { 
GridEditableItem editedItem = e.Item as GridEditableItem; 
                GridEditManager editMan = editedItem.EditManager; 
if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
            { 
                editor_iCaptureTypeComboBoxControl.SelectedIndexChanged += new EventHandler(editor_iCaptureTypeComboBoxControl_SelectedIndexChanged); 
                editor_iCaptureTypeComboBoxControl.AutoPostBack = true
 
 
 
void editor_iCaptureTypeComboBoxControl_SelectedIndexChanged(object sender, EventArgs e) 
        { 
        . 
.} 
which is not fired when the user changes the selection (still in edit mode) - why?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 16 Jan 2009, 03:36 AM
Hi Hk,

Try the above code snippet in the ItemCreated event instead of ItemDataBound event and see if it works.
Distinguishing the major differences between ItemCreated and ItemDataBound events

Shinu
Tags
Grid
Asked by
Hk
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or