All,
I am new with Telerik and to this forum. I'm working on a Radgrid with a dropdown box that will be populated on pre-render. This works fine and the values come in as expected. However, when I try to grab them they will not appear in newValues. If I change the RadDropDownList back to a GrindBoundColumn the function works as expected.
Any help is appreciated! Thanks!
ASPX:
<telerik:GridTemplateColumn HeaderText="Bin #" HeaderStyle-Width="260px" DataField="Bin_no" UniqueName="Mat_Bin_no">
<ItemTemplate>
<telerik:RadDropDownList runat="server" ID="rddBin_no" Width="250px"
DataTextField="Bin_no" DataValueField="Bin_no">
</telerik:RadDropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
VB:
Private Function FindMaterialData(ByVal sender As Object, ByVal e As GridBatchEditingEventArgs, sOrdNo As String, sLoc As String) As Boolean
Dim bErrorsFound As Boolean = False
Dim p_iWisysReturnValue As Integer = 0
Dim iSequenceNo As String
Dim sItemNo As String
Dim sBin As String
Dim sSerialLot As String
Dim dqty As Double
Dim dtExpDate As Date
Dim e2 As Telerik.Web.UI.GridItemEventArgs
Dim bIsEdited As Boolean = True
Dim lOffset As Long = 0
For Each row As GridDataItem In rgMaterial.Items
Dim Command As GridBatchEditingCommand
Try
Command = e.Commands.Item(row.ItemIndex - lOffset)
If Command.Item.DataSetIndex <> row.ItemIndex Then
bIsEdited = False
lOffset = lOffset + 1
Else
bIsEdited = True
End If
Catch
bIsEdited = False
End Try
iSequenceNo = row("Mat_seq_no").Text
sItemNo = row("Mat_item_no").Text
''Edited rows
If bIsEdited Then
Dim newValues As Hashtable = Command.NewValues
Dim oldValues As Hashtable = Command.OldValues
sSerialLot = newValues("ser_lot_no")
sBin = newValues("bin_no")
dqty = newValues("QtyRemaining")
Else
'Non edited rows
sSerialLot = row("Mat_ser_lot_no").Text
sBin = row("Mat_bin_no").Text
dqty = row("Mat_QtyRemaining").Text
End If
If dqty <> 0 Then
doSomething()
End If
Next
FindMaterialData = Not bErrorsFound
End Function