Then I click insert to do InsertCommand event.
But I can't get the select value; I get this value which is Page_init default value.
e.g. strGlobal_App = ""; not strGlobal_App = "XXX"
ps. It neither works correctly by GridTextColumnEditor.
Thanks for your help.
Here is my sample code:
<telerik:RadGrid ID="grd" runat="server" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
oninsertcommand="grd_InsertCommand">
<MasterTableView DataKeyNames="GUI" AutoGenerateColumns="False"
CommandItemDisplay="TopAndBottom" HorizontalAlign="NotSet"
InsertItemDisplay="Top"
InsertItemPageIndexAction="ShowItemOnFirstPage" >
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridDropDownColumn UniqueName="Global_App" ListTextField="comment" ListValueField="value"
DataSourceID="XmlDataSource_Global_App" HeaderText="Global_App" DataField="Global_App"
DropDownControlType="RadComboBox" AllowSorting="true">
</telerik:GridDropDownColumn>
</Columns>
<CommandItemSettings AddNewRecordText="Add new record" AddNewRecordImageUrl="img/AddRecord.gif"
RefreshText="Refresh" RefreshImageUrl="img/Refresh.gif" />
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<FilterMenu EnableTheming="True">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
protected void grd_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
GridEditableItem item = (GridEditableItem)e.Item;
string strGlobal_App = (item.EditManager.GetColumnEditor("Global_App") as GridDropDownColumnEditor).SelectedValue;
~do insert into sql table~
}