Hi
Im using Visual Studio 2022 and c#
I have a telerik RadGrid within my apsx page and I have set editMode="batch"
One of the columns SOStatus is a raddropdownList, with set items. When I select from the dropdown list and click on saveChanges within BatchEditCommand the SOStatus is blank, even though I have selected something. Not sure why?
Here is my ASPX
<telerik:GridTemplateColumn UniqueName="SOStatus" DataField="SOStatus" HeaderText="SO Status">
<HeaderStyle Width="80px" />
<ItemStyle Width="80px" />
<ItemTemplate>
<%# Eval("SOStatus") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList ID="rdSOStatus" runat="server" DataValueField="SOStatus" DataTextField="SOStatus" Width="110%">
<Items>
<telerik:DropDownListItem Text="" />
<telerik:DropDownListItem Text="Sale" />
<telerik:DropDownListItem Text="Pull Forward" />
<telerik:DropDownListItem Text="Risk" />
<telerik:DropDownListItem Text="Drop for this week" />
<telerik:DropDownListItem Text="Drop" />
</Items>
</telerik:RadDropDownList>
</EditItemTemplate>
</telerik:GridTemplateColumn>
and here is the BatchEditCommand c# code
protected void rg_SalesPlan_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
{
var batchEditingCommands = (List<GridBatchEditingCommand>)e.Commands;
foreach (GridBatchEditingCommand batchCommand in batchEditingCommands)
{
Hashtable oldValues = batchCommand.OldValues;
Hashtable newValues = batchCommand.NewValues;
string SOStatus = newValues["SOStatus"].ToString();
string OrigSOStatus = oldValues["SOStatus"].ToString();
}