DropDownList Value Not in Hashtable

2 posts, 0 answers
  1. Ray
    Ray avatar
    1 posts
    Member since:
    Apr 2014

    Posted 11 Jul Link to this post

    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



    <telerik:GridTemplateColumn DataField="Attended" HeaderText="Attended" AllowFiltering="false">
                            <asp:Label ID="AttendedLabel" runat="server" Text='<%# Eval("Attended") %>'></asp:Label>
                        <telerik:RadDropDownList ID="ddAttended" runat="server" Width="55px">
                                <telerik:DropDownListItem Text="" />
                                <telerik:DropDownListItem Text="Yes" />
                                <telerik:DropDownListItem Text="No" />



    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())
                    editedItem.Edit = Falsetable
            End If
        End Sub

  2. Eyup
    Eyup avatar
    2941 posts

    Posted 14 Jul Link to this post

    Hello Ray,

    I've already replied to your ticket with ID: 1049853. I suggest that we continue our conversation on the mentioned thread if there are any further questions.

    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top