Hi,
I'm new to the RadGird control and am trying to use the Batch editing capability.
I am populating the control from code and have set the OnBatchEditCommand on the form.
When I view the form and add items using the Add New Item prompt I am able to create new items. However, when I Click Save Changes my BatchEditCommand event is fired, but the command collection count is zero.
I have included a screen shot and snippets of code:
<form id="frmList" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<telerik:RadGrid ID="grdList" OnBatchEditCommand="grdList_BatchEditCommand" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" runat="server">
<MasterTableView EditMode="Batch" CommandItemDisplay="Top" DataKeyNames="Code" Name="SalesCodes">
<BatchEditingSettings OpenEditingEvent="Click" EditType="Cell" />
</MasterTableView>
</telerik:RadGrid>
</div>
</form>
_________________________________________________________________________________
colText = New GridBoundColumn
colText.HeaderText = rsData.Item("FieldCaption")
colText.DataField = rsData.Item("FieldName")
colText.MaxLength = rsData.Item("FieldLength")
iFormWidth = iFormWidth + rsData.Item("FieldWidth") + 3
If Not IsDBNull(rsData.Item("FieldDefault")) Then
structDefaultValues(iDefaultValues).iCellNumber = rsData.Item("FieldID")
structDefaultValues(iDefaultValues).sDefault = rsData.Item("FieldDefault")
structDefaultValues(iDefaultValues).sType = rsData.Item("FieldType")
iDefaultValues = iDefaultValues + 1
End If
grdList.MasterTableView.EditFormSettings.CaptionDataField = sKeyField
grdList.MasterTableView.Name = strName
grdList.MasterTableView.DataKeyNames = arrKeys
grdList.Columns.Add(colText)
____________________________________________________________________
Protected Sub grdList_BatchEditCommand(sender As Object, e As GridBatchEditingEventArgs)
For Each Cmd As GridBatchEditingCommand In e.Commands
Dim newval As Hashtable = Cmd.NewValues
Next
End Sub