I have an application for training attendance where a column in the database is a varchar but when editing the record they want a dropdown with Yes|No values. That is fine however, when updating the the records the UpdateCommand does not the dropdown values in the Hashtable.
BTW - the edimode for the grid is "InPlace".
Any help would greatly be appreciated. Thanks
ASPX
<telerik:GridTemplateColumn DataField="Attended" HeaderText="Attended" AllowFiltering="false">
<ItemTemplate>
<asp:Label ID="AttendedLabel" runat="server" Text='<%# Eval("Attended") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList ID="ddAttended" runat="server" Width="55px">
<Items>
<telerik:DropDownListItem Text="" />
<telerik:DropDownListItem Text="Yes" />
<telerik:DropDownListItem Text="No" />
</Items>
</telerik:RadDropDownList>
</EditItemTemplate>
</telerik:GridTemplateColumn>
VB
Protected Sub rgCourse_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
If (e.CommandName = "UpdateAll") Then
For Each editedItem As GridEditableItem In rgCourse.EditItems
Dim newValues As Hashtable = New Hashtable
'The GridTableView will fill the values from all editable columns in the hash
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)
dsCourses.UpdateCommand = String.Format("Update vwCurrentCourse SET Attended='{0}' WHERE Registration_ID='{1}'", newValues("Attended").ToString(), editedItem.GetDataKeyValue("Registration_ID").ToString())
dsCourses.Update()
editedItem.Edit = Falsetable
Next
End If
rgCourse.Rebind()
End Sub