I was referencing this post earlier: http://www.telerik.com/community/forums/aspnet/grid/radgrid-bind-dropdownlist-after-edit-mode.aspx. The problem with that is my grid item is never of type GridEditFormItem. Here's my method and template code. How can I find and bind the DDL during edit mode of the row?
protected
void
MyAccountsGrid_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item.IsInEditMode)
{
// find the template control
}
}
<
telerik:RadGrid
ID
=
"MyAccountsGrid"
AllowSorting
=
"true"
runat
=
"server"
AllowPaging
=
"true"
PageSize
=
"20"
AllowMultiRowSelection
=
"true"
AllowFilteringByColumn
=
"true"
EnableLinqExpressions
=
"true"
AllowAutomaticInserts
=
"false"
OnItemDataBound
=
"MyAccountsGrid_ItemDataBound"
>
<
MasterTableView
TableLayout
=
"Auto"
AutoGenerateColumns
=
"false"
AllowFilteringByColumn
=
"true"
CommandItemDisplay
=
"Top"
EditMode
=
"InPlace"
ClientDataKeyNames
=
"Id,AccountNumber"
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"true"
AddNewRecordText
=
"Add"
/>
<
telerik:GridTemplateColumn
HeaderText
=
"MyDDL"
UniqueName
=
"MyDDL"
>
<
HeaderTemplate
>
MyDDL
</
HeaderTemplate
>
<
ItemTemplate
>
<%# Eval("AccountType") %>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:DropDownList
ID
=
"accountTypeDDL"
runat
=
"server"
></
asp:DropDownList
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>